linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] gpio: gpio: aggregator: fix macros coding style error
@ 2025-07-31  8:49 Li Jun
  2025-07-31  8:55 ` Geert Uytterhoeven
  0 siblings, 1 reply; 2+ messages in thread
From: Li Jun @ 2025-07-31  8:49 UTC (permalink / raw)
  To: lijun01, geert+renesas, linus.walleij, brgl, linux-gpio

These changes just fix Linux Kernel Coding Style, no functional
improve.

-Macros with complex values should be enclosed in parentheses

Signed-off-by: Li Jun <lijun01@kylinos.cn>
---
 drivers/gpio/gpio-aggregator.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/gpio-aggregator.c b/drivers/gpio/gpio-aggregator.c
index 6f941db02c04..16c1ddc66013 100644
--- a/drivers/gpio/gpio-aggregator.c
+++ b/drivers/gpio/gpio-aggregator.c
@@ -247,8 +247,8 @@ struct gpiochip_fwd {
 	unsigned long tmp[];		/* values and descs for multiple ops */
 };
 
-#define fwd_tmp_values(fwd)	&(fwd)->tmp[0]
-#define fwd_tmp_descs(fwd)	(void *)&(fwd)->tmp[BITS_TO_LONGS((fwd)->chip.ngpio)]
+#define fwd_tmp_values(fwd)	(&(fwd)->tmp[0])
+#define fwd_tmp_descs(fwd)	((void *)&(fwd)->tmp[BITS_TO_LONGS((fwd)->chip.ngpio)])
 
 #define fwd_tmp_size(ngpios)	(BITS_TO_LONGS((ngpios)) + (ngpios))
 
-- 
2.25.1


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

* Re: [PATCH v2] gpio: gpio: aggregator: fix macros coding style error
  2025-07-31  8:49 [PATCH v2] gpio: gpio: aggregator: fix macros coding style error Li Jun
@ 2025-07-31  8:55 ` Geert Uytterhoeven
  0 siblings, 0 replies; 2+ messages in thread
From: Geert Uytterhoeven @ 2025-07-31  8:55 UTC (permalink / raw)
  To: Li Jun; +Cc: geert+renesas, linus.walleij, brgl, linux-gpio

Hi Li,

On Thu, 31 Jul 2025 at 10:50, Li Jun <lijun01@kylinos.cn> wrote:
> These changes just fix Linux Kernel Coding Style, no functional
> improve.
>
> -Macros with complex values should be enclosed in parentheses
>
> Signed-off-by: Li Jun <lijun01@kylinos.cn>

Thanks for the update!

One "gpio" too much ;-) s/gpio: gpio/gpio/

My
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
on v1 is still valid for the actual code change.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

end of thread, other threads:[~2025-07-31  8:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-31  8:49 [PATCH v2] gpio: gpio: aggregator: fix macros coding style error Li Jun
2025-07-31  8:55 ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).