Re: [PATCH 15/20] staging: lustre: llite: mark expected switch fall-through

2017-10-17 Thread Dilger, Andreas

> On Oct 12, 2017, at 10:17, Gustavo A. R. Silva  
> wrote:
> 
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
> 
> Signed-off-by: Gustavo A. R. Silva 

Not sure why you moved the "for mode = 0" comment to a separate line?
Not the end of the world though.

Reviewed-by: Andreas Dilger 

> ---
> drivers/staging/lustre/lustre/llite/namei.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/lustre/lustre/llite/namei.c 
> b/drivers/staging/lustre/lustre/llite/namei.c
> index 5cc2b32..55e0d03 100644
> --- a/drivers/staging/lustre/lustre/llite/namei.c
> +++ b/drivers/staging/lustre/lustre/llite/namei.c
> @@ -949,7 +949,9 @@ static int ll_mknod(struct inode *dir, struct dentry 
> *dchild,
> 
>   switch (mode & S_IFMT) {
>   case 0:
> - mode |= S_IFREG; /* for mode = 0 case, fallthrough */
> + mode |= S_IFREG;
> + /* for mode = 0 case */
> + /* fall through */
>   case S_IFREG:
>   case S_IFCHR:
>   case S_IFBLK:
> -- 
> 2.7.4
> 

Cheers, Andreas
--
Andreas Dilger
Lustre Principal Architect
Intel Corporation







___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 15/20] staging: lustre: llite: mark expected switch fall-through

2017-10-12 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Signed-off-by: Gustavo A. R. Silva 
---
 drivers/staging/lustre/lustre/llite/namei.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/llite/namei.c 
b/drivers/staging/lustre/lustre/llite/namei.c
index 5cc2b32..55e0d03 100644
--- a/drivers/staging/lustre/lustre/llite/namei.c
+++ b/drivers/staging/lustre/lustre/llite/namei.c
@@ -949,7 +949,9 @@ static int ll_mknod(struct inode *dir, struct dentry 
*dchild,
 
switch (mode & S_IFMT) {
case 0:
-   mode |= S_IFREG; /* for mode = 0 case, fallthrough */
+   mode |= S_IFREG;
+   /* for mode = 0 case */
+   /* fall through */
case S_IFREG:
case S_IFCHR:
case S_IFBLK:
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel