Re: [PATCH] drivers: staging: gpib: minor fixes for some C macros.
From: Abdalla Ahmad
Date: Fri Jun 27 2025 - 15:53:32 EST
Hi
> This breaks the build.
Sorry but how is this breaking the build? Putting checkpatch.pl aside, intuitively it makes sense to wrap long macros in parenthesis to avoid compile time errors and runtime bugs...
Best Regards,
Abdalla
________________________________________
From: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Sent: Friday, June 27, 2025 10:39 PM
To: Abdalla Ahmad <Abdalla.Ahmad@xxxxxxxxxxxxx>
Cc: Dave Penkler <dpenkler@xxxxxxxxx>; Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>; Michael Rubin <matchstick@xxxxxxxxxxxxxx>; Arnd Bergmann <arnd@xxxxxxxx>; Paul Retourné <paul.retourne@xxxxxxxxx>; open list:STAGING SUBSYSTEM <linux-staging@xxxxxxxxxxxxxxx>; open list <linux-kernel@xxxxxxxxxxxxxxx>
Subject: Re: [PATCH] drivers: staging: gpib: minor fixes for some C macros.
On Fri, Jun 27, 2025 at 10:36:13PM +0300, Abdalla Al-Dalleh wrote:
> Ran checkpatch.pl on drivers/staging/gpib/, found the following:
> - gpio: gpib_bitbang.c: wrapped LINVAL macro w/ parenthesis.
> - hp_82341: hp_82341.c: Used comments instead of "#if 0"
> - tnt4882: tnt4882_gpib.c: Used comments instead of "#if 0"
>
> Signed-off-by: Abdalla Al-Dalleh <abdalla.ahmad@xxxxxxxxxxxxx>
> ---
> drivers/staging/gpib/gpio/gpib_bitbang.c | 4 ++--
> drivers/staging/gpib/hp_82341/hp_82341.c | 14 +++++++-------
> drivers/staging/gpib/tnt4882/tnt4882_gpib.c | 14 +++++++-------
> 3 files changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/staging/gpib/gpio/gpib_bitbang.c b/drivers/staging/gpib/gpio/gpib_bitbang.c
> index 625fef24a0bf..45cf4571c58d 100644
> --- a/drivers/staging/gpib/gpio/gpib_bitbang.c
> +++ b/drivers/staging/gpib/gpio/gpib_bitbang.c
> @@ -47,10 +47,10 @@
> dev_dbg(board->gpib_dev, frm, ## __VA_ARGS__); } \
> while (0)
>
> -#define LINVAL gpiod_get_value(DAV), \
> +#define LINVAL (gpiod_get_value(DAV), \
> gpiod_get_value(NRFD), \
> gpiod_get_value(NDAC), \
> - gpiod_get_value(SRQ)
> + gpiod_get_value(SRQ))
This breaks the build.
regards,
dan carpenter