public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] tools/nolibc/types.h: fix mismatched parenthesis in minor()
@ 2025-04-09 19:14 Jemmy Wong
  2025-04-09 19:19 ` Thomas Weißschuh
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jemmy Wong @ 2025-04-09 19:14 UTC (permalink / raw)
  To: Willy Tarreau, linux; +Cc: linux-kernel, Jemmy Wong

Fix an imbalance where opening parentheses exceed closing ones.

Signed-off-by: Jemmy Wong <Jemmywong512@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] tools/nolibc/types.h: fix mismatched parenthesis in minor()
  2025-04-09 19:14 [PATCH v2] tools/nolibc/types.h: fix mismatched parenthesis in minor() Jemmy Wong
@ 2025-04-09 19:19 ` Thomas Weißschuh
  2025-04-09 19:19 ` Willy Tarreau
  2025-04-10 20:08 ` Thomas Weißschuh
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Weißschuh @ 2025-04-09 19:19 UTC (permalink / raw)
  To: Jemmy Wong; +Cc: Willy Tarreau, linux-kernel

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@gmail.com>
> ---
>  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
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] tools/nolibc/types.h: fix mismatched parenthesis in minor()
  2025-04-09 19:14 [PATCH v2] tools/nolibc/types.h: fix mismatched parenthesis in minor() Jemmy Wong
  2025-04-09 19:19 ` Thomas Weißschuh
@ 2025-04-09 19:19 ` Willy Tarreau
  2025-04-10 20:08 ` Thomas Weißschuh
  2 siblings, 0 replies; 4+ messages in thread
From: Willy Tarreau @ 2025-04-09 19:19 UTC (permalink / raw)
  To: Jemmy Wong; +Cc: linux, linux-kernel

On Thu, Apr 10, 2025 at 03:14:36AM +0800, Jemmy Wong wrote:
> Fix an imbalance where opening parentheses exceed closing ones.
> 
> Signed-off-by: Jemmy Wong <Jemmywong512@gmail.com>

Acked-by: Willy Tarreau <w@1wt.eu>
and thank you as well Jeremy for fixing this one!

willy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] tools/nolibc/types.h: fix mismatched parenthesis in minor()
  2025-04-09 19:14 [PATCH v2] tools/nolibc/types.h: fix mismatched parenthesis in minor() Jemmy Wong
  2025-04-09 19:19 ` Thomas Weißschuh
  2025-04-09 19:19 ` Willy Tarreau
@ 2025-04-10 20:08 ` Thomas Weißschuh
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Weißschuh @ 2025-04-10 20:08 UTC (permalink / raw)
  To: Jemmy Wong; +Cc: Willy Tarreau, linux-kernel

Hi 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


On 2025-04-10 03:14:36+0800, Jemmy Wong wrote:
> Fix an imbalance where opening parentheses exceed closing ones.
>
> Signed-off-by: Jemmy Wong <Jemmywong512@gmail.com>
> ---
>  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
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-04-10 20:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-09 19:14 [PATCH v2] tools/nolibc/types.h: fix mismatched parenthesis in minor() Jemmy Wong
2025-04-09 19:19 ` Thomas Weißschuh
2025-04-09 19:19 ` Willy Tarreau
2025-04-10 20:08 ` Thomas Weißschuh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox