[FIRST-PATCH] staging: gpib : gpio : gpib_bitbang.c : fixed parentheses error.

rujra posted 1 patch 7 months, 1 week ago
drivers/staging/gpib/gpio/gpib_bitbang.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[FIRST-PATCH] staging: gpib : gpio : gpib_bitbang.c : fixed parentheses error.
Posted by rujra 7 months, 1 week ago
To pass it as one parameter, wrapped the entire macro expansion in parentheses.
and build it successfully.

Signed-off-by: Rujra Bhatt <braker.noob.kernel@gmail.com>
---
 drivers/staging/gpib/gpio/gpib_bitbang.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/gpib/gpio/gpib_bitbang.c
b/drivers/staging/gpib/gpio/gpib_bitbang.c
index 9670522fe36e..a1f9c99c5ad2 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))
 #define LINFMT "DAV: %d         NRFD:%d  NDAC: %d SRQ: %d"

 #include "gpibP.h"
--
2.43.0
Re: [FIRST-PATCH] staging: gpib : gpio : gpib_bitbang.c : fixed parentheses error.
Posted by Dan Carpenter 7 months, 1 week ago
On Wed, May 07, 2025 at 10:48:45PM +0530, rujra wrote:
> To pass it as one parameter, wrapped the entire macro expansion in parentheses.
> and build it successfully.
     ^^^^^^^^^^^^^^^^^^^^^^
No, it doesn't build.

regards,
dan carpenter