Skip to contentSkip to conversation

exfat: remove the assignment of 0 to bool variable

PATCH In review Jason Yan 2 participants 2 messages Apr 14, 2020 – Apr 16, 2020

Subsystems (2)
lore
Share & tools
lore

Jason Yan

author
#0 lore raw

PATCH 1/1 exfat: remove the assignment of 0 to bool variable

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

---
 fs/exfat/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/exfat/super.c +1 -1
index 16ed202ef527..b86755468904 100644
@@ -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)
Signature · 1 line
2.21.1
#1 lore raw
Quoted 6 lines

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

Pushed it to exfat dev.

Thanks for your patch!

Quoted 19 lines
---
 fs/exfat/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/exfat/super.c index renamed from fs/exfat/super.c +0 -0

16ed202ef527..b86755468904 100644

fs/exfat/super.c +1 -2
@@ -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