Skip to contentSkip to conversation

fs: fix cast in fsparam_u32hex() macro

PATCH In review Alexey Dobriyan 2 participants 2 messages Sep 16, 2020 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs: fix cast in fsparam_u32hex() macro

---

 include/linux/fs_parser.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/fs_parser.h +1 -1
@@ -120,7 +120,7 @@ static inline bool fs_validate_description(const char *name,
 #define fsparam_u32oct(NAME, OPT) \
 			__fsparam(fs_param_is_u32, NAME, OPT, 0, (void *)8)
 #define fsparam_u32hex(NAME, OPT) \
-			__fsparam(fs_param_is_u32_hex, NAME, OPT, 0, (void *16))
+			__fsparam(fs_param_is_u32_hex, NAME, OPT, 0, (void *)16)
 #define fsparam_s32(NAME, OPT)	__fsparam(fs_param_is_s32, NAME, OPT, 0, NULL)
 #define fsparam_u64(NAME, OPT)	__fsparam(fs_param_is_u64, NAME, OPT, 0, NULL)
 #define fsparam_enum(NAME, OPT, array)	__fsparam(fs_param_is_enum, NAME, OPT, 0, array)
maintainer
#1 lore raw
Quoted 9 lines · Alexey Dobriyan

---

 include/linux/fs_parser.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

include/linux/fs_parser.h static inline bool fs_validate_description(const char *name, · line 126

Quoted 8 lines
include/linux/fs_parser.h +1 -1
@@ -120,7 +120,7 @@ static inline bool fs_validate_description(const char *name,
 #define fsparam_u32oct(NAME, OPT) \
 			__fsparam(fs_param_is_u32, NAME, OPT, 0, (void *)8)
 #define fsparam_u32hex(NAME, OPT) \
-			__fsparam(fs_param_is_u32_hex, NAME, OPT, 0, (void *16))
+			__fsparam(fs_param_is_u32_hex, NAME, OPT, 0, (void *)16)
 #define fsparam_s32(NAME, OPT)	__fsparam(fs_param_is_s32, NAME, OPT, 0, NULL)
 #define fsparam_u64(NAME, OPT)	__fsparam(fs_param_is_u64, NAME, OPT, 0, NULL)
 #define fsparam_enum(NAME, OPT, array)	__fsparam(fs_param_is_enum, NAME, OPT, 0, array)

Nice catch; applied.