Re: [PATCH] drivers: staging: gpib: minor fixes for some C macros.

From: Dan Carpenter
Date: Fri Jun 27 2025 - 15:40:28 EST


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