diff options
author | Tomohiro Kusumi <tkusumi@tuxera.com> | 2017-04-09 01:11:36 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-04-11 04:48:10 +0200 |
commit | 68afcf2d38cd7544817558757e57e7b9d5c4e72c (patch) | |
tree | f9615c9e7fe7adb2958d5b4c489aa93ed8ab5870 /fs/f2fs/xattr.h | |
parent | f2fs: fix comment on f2fs_flush_merged_bios() after 86531d6b (diff) | |
download | linux-68afcf2d38cd7544817558757e57e7b9d5c4e72c.tar.xz linux-68afcf2d38cd7544817558757e57e7b9d5c4e72c.zip |
f2fs: guard macro variables with braces
Add braces around variables used within macros for those make sense
to do it. Many of the macros in f2fs already do this. What this commit
doesn't do is anything that changes line# as a result of adding braces,
which usually affects the binary via __LINE__.
Confirmed no diff in fs/f2fs/f2fs.ko before/after this commit on x86_64,
to make sure this has no functional change as well as there's been no
unexpected side effect due to callers' arithmetics within the existing
code.
Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/xattr.h')
-rw-r--r-- | fs/f2fs/xattr.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/xattr.h b/fs/f2fs/xattr.h index 6afcee35ebeb..dbcd1d16e669 100644 --- a/fs/f2fs/xattr.h +++ b/fs/f2fs/xattr.h @@ -58,10 +58,10 @@ struct f2fs_xattr_entry { #define XATTR_FIRST_ENTRY(ptr) (XATTR_ENTRY(XATTR_HDR(ptr) + 1)) #define XATTR_ROUND (3) -#define XATTR_ALIGN(size) ((size + XATTR_ROUND) & ~XATTR_ROUND) +#define XATTR_ALIGN(size) (((size) + XATTR_ROUND) & ~XATTR_ROUND) #define ENTRY_SIZE(entry) (XATTR_ALIGN(sizeof(struct f2fs_xattr_entry) + \ - entry->e_name_len + le16_to_cpu(entry->e_value_size))) + (entry)->e_name_len + le16_to_cpu((entry)->e_value_size))) #define XATTR_NEXT_ENTRY(entry) ((struct f2fs_xattr_entry *)((char *)(entry) +\ ENTRY_SIZE(entry))) |