LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH][next] fs/ntfs3: Fix fall-through warnings for Clang
@ 2021-08-18 22:21 Gustavo A. R. Silva
2021-08-18 23:29 ` Nathan Chancellor
2021-08-27 16:26 ` Konstantin Komarov
0 siblings, 2 replies; 3+ messages in thread
From: Gustavo A. R. Silva @ 2021-08-18 22:21 UTC (permalink / raw)
To: Konstantin Komarov
Cc: ntfs3, linux-kernel, Gustavo A. R. Silva, linux-hardening
Fix the following fallthrough warnings:
fs/ntfs3/inode.c:1792:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
fs/ntfs3/index.c:178:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
This helps with the ongoing efforts to globally enable
-Wimplicit-fallthrough for Clang.
Link: https://github.com/KSPP/linux/issues/115
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
---
fs/ntfs3/index.c | 1 +
fs/ntfs3/inode.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/fs/ntfs3/index.c b/fs/ntfs3/index.c
index 6aa9540ece47..76eae60b7fce 100644
--- a/fs/ntfs3/index.c
+++ b/fs/ntfs3/index.c
@@ -175,6 +175,7 @@ static inline NTFS_CMP_FUNC get_cmp_func(const struct INDEX_ROOT *root)
default:
break;
}
+ break;
default:
break;
}
diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c
index bf51e294432e..a573c6e98cb8 100644
--- a/fs/ntfs3/inode.c
+++ b/fs/ntfs3/inode.c
@@ -1789,6 +1789,7 @@ int ntfs_unlink_inode(struct inode *dir, const struct dentry *dentry)
switch (err) {
case 0:
drop_nlink(inode);
+ break;
case -ENOTEMPTY:
case -ENOSPC:
case -EROFS:
--
2.27.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][next] fs/ntfs3: Fix fall-through warnings for Clang
2021-08-18 22:21 [PATCH][next] fs/ntfs3: Fix fall-through warnings for Clang Gustavo A. R. Silva
@ 2021-08-18 23:29 ` Nathan Chancellor
2021-08-27 16:26 ` Konstantin Komarov
1 sibling, 0 replies; 3+ messages in thread
From: Nathan Chancellor @ 2021-08-18 23:29 UTC (permalink / raw)
To: Gustavo A. R. Silva, Konstantin Komarov
Cc: ntfs3, linux-kernel, linux-hardening
On 8/18/2021 3:21 PM, Gustavo A. R. Silva wrote:
> Fix the following fallthrough warnings:
>
> fs/ntfs3/inode.c:1792:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
> fs/ntfs3/index.c:178:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
>
> This helps with the ongoing efforts to globally enable
> -Wimplicit-fallthrough for Clang.
>
> Link: https://github.com/KSPP/linux/issues/115
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
> ---
> fs/ntfs3/index.c | 1 +
> fs/ntfs3/inode.c | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/fs/ntfs3/index.c b/fs/ntfs3/index.c
> index 6aa9540ece47..76eae60b7fce 100644
> --- a/fs/ntfs3/index.c
> +++ b/fs/ntfs3/index.c
> @@ -175,6 +175,7 @@ static inline NTFS_CMP_FUNC get_cmp_func(const struct INDEX_ROOT *root)
> default:
> break;
> }
> + break;
> default:
> break;
> }
> diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c
> index bf51e294432e..a573c6e98cb8 100644
> --- a/fs/ntfs3/inode.c
> +++ b/fs/ntfs3/inode.c
> @@ -1789,6 +1789,7 @@ int ntfs_unlink_inode(struct inode *dir, const struct dentry *dentry)
> switch (err) {
> case 0:
> drop_nlink(inode);
> + break;
> case -ENOTEMPTY:
> case -ENOSPC:
> case -EROFS:
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH][next] fs/ntfs3: Fix fall-through warnings for Clang
2021-08-18 22:21 [PATCH][next] fs/ntfs3: Fix fall-through warnings for Clang Gustavo A. R. Silva
2021-08-18 23:29 ` Nathan Chancellor
@ 2021-08-27 16:26 ` Konstantin Komarov
1 sibling, 0 replies; 3+ messages in thread
From: Konstantin Komarov @ 2021-08-27 16:26 UTC (permalink / raw)
To: Gustavo A. R. Silva; +Cc: ntfs3, linux-kernel, linux-hardening
> From: Gustavo A. R. Silva <gustavoars@kernel.org>
> Sent: Thursday, August 19, 2021 1:22 AM
> To: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
> Cc: ntfs3@lists.linux.dev; linux-kernel@vger.kernel.org; Gustavo A. R. Silva <gustavoars@kernel.org>; linux-
> hardening@vger.kernel.org
> Subject: [PATCH][next] fs/ntfs3: Fix fall-through warnings for Clang
>
> Fix the following fallthrough warnings:
>
> fs/ntfs3/inode.c:1792:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
> fs/ntfs3/index.c:178:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
>
> This helps with the ongoing efforts to globally enable
> -Wimplicit-fallthrough for Clang.
>
> Link: https://github.com/KSPP/linux/issues/115
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
> ---
> fs/ntfs3/index.c | 1 +
> fs/ntfs3/inode.c | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/fs/ntfs3/index.c b/fs/ntfs3/index.c
> index 6aa9540ece47..76eae60b7fce 100644
> --- a/fs/ntfs3/index.c
> +++ b/fs/ntfs3/index.c
> @@ -175,6 +175,7 @@ static inline NTFS_CMP_FUNC get_cmp_func(const struct INDEX_ROOT *root)
> default:
> break;
> }
> + break;
> default:
> break;
> }
> diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c
> index bf51e294432e..a573c6e98cb8 100644
> --- a/fs/ntfs3/inode.c
> +++ b/fs/ntfs3/inode.c
> @@ -1789,6 +1789,7 @@ int ntfs_unlink_inode(struct inode *dir, const struct dentry *dentry)
> switch (err) {
> case 0:
> drop_nlink(inode);
> + break;
> case -ENOTEMPTY:
> case -ENOSPC:
> case -EROFS:
> --
> 2.27.0
Hi Gustavo, thank you. Picked into ntfs3 tree.
Best regards.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-27 16:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-18 22:21 [PATCH][next] fs/ntfs3: Fix fall-through warnings for Clang Gustavo A. R. Silva
2021-08-18 23:29 ` Nathan Chancellor
2021-08-27 16:26 ` Konstantin Komarov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).