* [PATCH] exfat: remove the assignment of 0 to bool variable
@ 2020-04-14 12:02 ` Jason Yan
2020-04-16 6:34 ` Namjae Jeon
0 siblings, 1 reply; 2+ messages in thread
From: Jason Yan @ 2020-04-14 12:02 UTC (permalink / raw)
To: namjae.jeon, sj1557.seo, linux-fsdevel, linux-kernel; +Cc: Jason Yan
There is no need to init 'sync' in exfat_set_vol_flags().
This also fixes the following coccicheck warning:
fs/exfat/super.c:104:6-10: WARNING: Assignment of 0/1 to bool variable
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
fs/exfat/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/exfat/super.c b/fs/exfat/super.c
index 16ed202ef527..b86755468904 100644
--- a/fs/exfat/super.c
+++ b/fs/exfat/super.c
@@ -101,7 +101,7 @@ int exfat_set_vol_flags(struct super_block *sb, unsigned short new_flag)
{
struct exfat_sb_info *sbi = EXFAT_SB(sb);
struct pbr64 *bpb;
- bool sync = 0;
+ bool sync;
/* flags are not changed */
if (sbi->vol_flag == new_flag)
--
2.21.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [PATCH] exfat: remove the assignment of 0 to bool variable
2020-04-14 12:02 ` [PATCH] exfat: remove the assignment of 0 to bool variable Jason Yan
@ 2020-04-16 6:34 ` Namjae Jeon
0 siblings, 0 replies; 2+ messages in thread
From: Namjae Jeon @ 2020-04-16 6:34 UTC (permalink / raw)
To: 'Jason Yan'; +Cc: linux-fsdevel, linux-kernel, sj1557.seo
> There is no need to init 'sync' in exfat_set_vol_flags().
> This also fixes the following coccicheck warning:
>
> fs/exfat/super.c:104:6-10: WARNING: Assignment of 0/1 to bool variable
>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
Pushed it to exfat dev.
Thanks for your patch!
> ---
> fs/exfat/super.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/exfat/super.c b/fs/exfat/super.c index
> 16ed202ef527..b86755468904 100644
> --- a/fs/exfat/super.c
> +++ b/fs/exfat/super.c
> @@ -101,7 +101,7 @@ int exfat_set_vol_flags(struct super_block *sb,
> unsigned short new_flag) {
> struct exfat_sb_info *sbi = EXFAT_SB(sb);
> struct pbr64 *bpb;
> - bool sync = 0;
> + bool sync;
>
> /* flags are not changed */
> if (sbi->vol_flag == new_flag)
> --
> 2.21.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-16 6:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20200414113819epcas1p4eafa861bec639fcdcb931fb68c1086ce@epcas1p4.samsung.com>
2020-04-14 12:02 ` [PATCH] exfat: remove the assignment of 0 to bool variable Jason Yan
2020-04-16 6:34 ` Namjae Jeon
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.