tools/nolibc/types.h: fix mismatched parenthesis in minor()
PATCH v2 1/1 tools/nolibc/types.h: fix mismatched parenthesis in minor()
Fix an imbalance where opening parentheses exceed closing ones.
--- tools/include/nolibc/types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/include/nolibc/types.h +1 -1
@@ -201,7 +201,7 @@ struct stat {/* WARNING, it only deals with the 4096 first majors and 256 first minors */ #define makedev (major, minor) ((dev_t)((((major) & 0xfff) << 8) | ((minor) & 0xff)))#define major (dev) ((unsigned int)(((dev) >> 8) & 0xfff)) -#define minor (dev) ((unsigned int)(((dev) & 0xff)) +#define minor (dev) ((unsigned int)((dev) & 0xff))#ifndef offsetof#define offsetof (TYPE ,FIELD ) ((size_t) &((TYPE *)0)->FIELD)
Signature · 1 line
2.43.0
Thomas Weißschuh
maintainerHi Jemmy,
Quoted 1 line · Jemmy Wong
Fix an imbalance where opening parentheses exceed closing ones.
Thanks! The patch looks good and I will pick it up soonish.
One note: When sending new revisions of patches, please always include a changelog of all differences in the new revision.
I can also recommend the b4 tool for taking care of many workflow tasks.
https://b4.docs.kernel.org/en/latest/
Quoted 21 lines
Signed-off-by Jemmy Wong <[email protected]>--- tools/include/nolibc/types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/include/nolibc/types.h +1
-1@@ -201,7 +201,7 @@ struct stat {/* WARNING, it only deals with the 4096 first majors and 256 first minors */ #define makedev (major, minor) ((dev_t)((((major) & 0xfff) << 8) | ((minor) & 0xff)))#define major (dev) ((unsigned int)(((dev) >> 8) & 0xfff)) -#define minor (dev) ((unsigned int)(((dev) & 0xff)) +#define minor (dev) ((unsigned int)((dev) & 0xff))#ifndef offsetof#define offsetof (TYPE ,FIELD ) ((size_t) &((TYPE *)0)->FIELD)Signature · 1 line
2.43.0
Quoted 3 lines · Jemmy Wong
Fix an imbalance where opening parentheses exceed closing ones.
Signed-off-by Jemmy Wong <[email protected]>
and thank you as well Jeremy for fixing this one!
willy
Thomas Weißschuh
maintainerHi Jemmy,
I fear this needs another revision.
Your name/email of the mail sender is not identical to the one in the Signed-off-by line.
Also the Fixes tag from the v1 feedback is missing.
Now that Willy gave you an Ack, that should also be in your trailers block.
The correct order is:
Fixes:
Signed-off-by:
Acked-by:
Please resend a v3.
Thomas
Quoted 23 lines · Jemmy Wong
Fix an imbalance where opening parentheses exceed closing ones.
Signed-off-by Jemmy Wong <[email protected]>--- tools/include/nolibc/types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/include/nolibc/types.h +1
-1@@ -201,7 +201,7 @@ struct stat {/* WARNING, it only deals with the 4096 first majors and 256 first minors */ #define makedev (major, minor) ((dev_t)((((major) & 0xfff) << 8) | ((minor) & 0xff)))#define major (dev) ((unsigned int)(((dev) >> 8) & 0xfff)) -#define minor (dev) ((unsigned int)(((dev) & 0xff)) +#define minor (dev) ((unsigned int)((dev) & 0xff))#ifndef offsetof#define offsetof (TYPE ,FIELD ) ((size_t) &((TYPE *)0)->FIELD)Signature · 1 line
2.43.0