Re: [PATCH v2] tools/nolibc/types.h: fix mismatched parenthesis in minor()

From: Thomas Weißschuh
Date: Wed Apr 09 2025 - 15:19:55 EST


Hi Jemmy,

On 2025-04-10 03:14:36+0800, Jemmy Wong wrote:
> 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/

> Signed-off-by: Jemmy Wong <Jemmywong512@xxxxxxxxx>
> ---
> tools/include/nolibc/types.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/include/nolibc/types.h b/tools/include/nolibc/types.h
> index b26a5d0c417c..32d0929c633b 100644
> --- a/tools/include/nolibc/types.h
> +++ b/tools/include/nolibc/types.h
> @@ -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)
> --
> 2.43.0
>