Re: [PATCH 02/15] staging: rtl8723bs: put parentheses on macros with complex values in hal/HalBtcOutSrc.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 26, 2021 at 12:54:49PM +0300, Dan Carpenter wrote:
> On Fri, Mar 26, 2021 at 10:09:09AM +0100, Fabio Aiuto wrote:
> > fix the following checkpatch warning:
> > 
> > ERROR: Macros with complex values should be enclosed in parentheses
> > 152: FILE: drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h:152:
> > +#define BTC_PRINT(dbgtype, dbgflag, printstr) \
> > no_printk printstr
> > --
> > ERROR: Macros with complex values should be enclosed in parentheses
> > 153: FILE: drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h:153:
> > +#define BTC_PRINT_F(dbgtype, dbgflag, printstr) \
> > no_printk printstr
> > --
> > ERROR: Macros with complex values should be enclosed in parentheses
> > 154: FILE: drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h:154:
> > +#define BTC_PRINT_ADDR(dbgtype, dbgflag, printstr, _Ptr) \
> > no_printk printstr
> > 
> > Signed-off-by: Fabio Aiuto <fabioaiuto83@xxxxxxxxx>
> > ---
> >  drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h b/drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h
> > index 10c021024b24..1926a1f7a7e5 100644
> > --- a/drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h
> > +++ b/drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h
> > @@ -149,9 +149,9 @@ extern u32 		GLBtcDbgType[];
> >  }
> >  
> >  #else
> > -#define BTC_PRINT(dbgtype, dbgflag, printstr)		 no_printk printstr
> > -#define BTC_PRINT_F(dbgtype, dbgflag, printstr)		 no_printk printstr
> > -#define BTC_PRINT_ADDR(dbgtype, dbgflag, printstr, _Ptr) no_printk printstr
> > +#define BTC_PRINT(dbgtype, dbgflag, printstr)		 (no_printk printstr)
> > +#define BTC_PRINT_F(dbgtype, dbgflag, printstr)		 (no_printk printstr)
> > +#define BTC_PRINT_ADDR(dbgtype, dbgflag, printstr, _Ptr) (no_printk printstr)
> 
> This makes no sense at all.  no_printk is a function.  The BTC_PRINT()
> macros are super ugly and this only makes it worse.
> 
> regards,
> dan carpenter
> 

so I'll just drop the patch in the next v2

thanks,

fabio




[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux