Skip to content

Commit 80d6505

Browse files
konistorvalds
authored andcommitted
nilfs2: remove loops of single statement macros
This fixes checkpatch.pl warning "WARNING: Single statement macros should not use a do {} while (0) loop". Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ryusuke Konishi <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 7f00184 commit 80d6505

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

fs/nilfs2/the_nilfs.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,15 +222,14 @@ THE_NILFS_FNS(SB_DIRTY, sb_dirty)
222222
* Mount option operations
223223
*/
224224
#define nilfs_clear_opt(nilfs, opt) \
225-
do { (nilfs)->ns_mount_opt &= ~NILFS_MOUNT_##opt; } while (0)
225+
((nilfs)->ns_mount_opt &= ~NILFS_MOUNT_##opt)
226226
#define nilfs_set_opt(nilfs, opt) \
227-
do { (nilfs)->ns_mount_opt |= NILFS_MOUNT_##opt; } while (0)
227+
((nilfs)->ns_mount_opt |= NILFS_MOUNT_##opt)
228228
#define nilfs_test_opt(nilfs, opt) ((nilfs)->ns_mount_opt & NILFS_MOUNT_##opt)
229229
#define nilfs_write_opt(nilfs, mask, opt) \
230-
do { (nilfs)->ns_mount_opt = \
230+
((nilfs)->ns_mount_opt = \
231231
(((nilfs)->ns_mount_opt & ~NILFS_MOUNT_##mask) | \
232-
NILFS_MOUNT_##opt); \
233-
} while (0)
232+
NILFS_MOUNT_##opt)) \
234233

235234
/**
236235
* struct nilfs_root - nilfs root object

0 commit comments

Comments
 (0)