Re: [PATCH v3 06/10] staging: r8188eu: Add space between function & macro parameters

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

 



On Thu, Oct 20, 2022 at 11:17:21AM +0200, Julia Lawall wrote:
>
>
> On Thu, 20 Oct 2022, Deepak R Varma wrote:
>
> > Space required between function and macro parameters to improve code
> > readability. This Linux kernel coding style guideline resolves following
> > error reported by checkpatch script:
> > 	ERROR: space required after that ',' (ctx:VxV)
> >
> > Signed-off-by: Deepak R Varma <drv@xxxxxxxxx>
> > ---
> >
> > Changes in v3:
> >    1. Patch newly added to the patch set.
> >
> >
> >
> > -u8 rtw_gettssi_cmd(struct adapter  *padapter, u8 offset,u8 *pval);
> > +u8 rtw_gettssi_cmd(struct adapter  *padapter, u8 offset, u8 *pval);
> >  u8 rtw_setfwdig_cmd(struct adapter*padapter, u8 type);
> >  u8 rtw_setfwra_cmd(struct adapter*padapter, u8 type);
>
> Strange double space.

Agreed, made a note.

>
> >
> > @@ -751,7 +751,7 @@ u8 rtw_dynamic_chk_wk_cmd(struct adapter *adapter);
> >  u8 rtw_lps_ctrl_wk_cmd(struct adapter*padapter, u8 lps_ctrl_type, u8 enqueue);
> >  u8 rtw_rpt_timer_cfg_cmd(struct adapter*padapter, u16 minRptTime);
> >
> > - u8 rtw_antenna_select_cmd(struct adapter*padapter, u8 antenna,u8 enqueue);
> > + u8 rtw_antenna_select_cmd(struct adapter*padapter, u8 antenna, u8 enqueue);
>
> Missing space before *.

Agreed, made a note.

>
> >  u8 rtw_ps_cmd(struct adapter*padapter);
> >
> > diff --git a/drivers/staging/r8188eu/include/rtw_io.h b/drivers/staging/r8188eu/include/rtw_io.h
> > index 925c7967ac04..87fcf6c94ff3 100644
> > --- a/drivers/staging/r8188eu/include/rtw_io.h
> > +++ b/drivers/staging/r8188eu/include/rtw_io.h
> > @@ -209,7 +209,7 @@ struct io_priv {
> >  };
> >
> > -#define PlatformEFIOWrite1Byte(_a,_b,_c)		\
> > -	rtw_write8(_a,_b,_c)
> > -#define PlatformEFIOWrite2Byte(_a,_b,_c)		\
> > -	rtw_write16(_a,_b,_c)
> > -#define PlatformEFIOWrite4Byte(_a,_b,_c)		\
> > -	rtw_write32(_a,_b,_c)
> > -
> > -#define PlatformEFIORead1Byte(_a,_b)		\
> > -		rtw_read8(_a,_b)
> > -#define PlatformEFIORead2Byte(_a,_b)		\
> > -		rtw_read16(_a,_b)
> > -#define PlatformEFIORead4Byte(_a,_b)		\
> > -		rtw_read32(_a,_b)
> > +#define PlatformEFIOWrite1Byte(_a, _b, _c)		\
> > +	rtw_write8(_a, _b, _c)
> > +#define PlatformEFIOWrite2Byte(_a, _b, _c)		\
> > +	rtw_write16(_a, _b, _c)
> > +#define PlatformEFIOWrite4Byte(_a, _b, _c)		\
> > +	rtw_write32(_a, _b, _c)
> > +
> > +#define PlatformEFIORead1Byte(_a, _b)		\
> > +		rtw_read8(_a, _b)
> > +#define PlatformEFIORead2Byte(_a, _b)		\
> > +		rtw_read16(_a, _b)
> > +#define PlatformEFIORead4Byte(_a, _b)		\
> > +		rtw_read32(_a, _b)
>
> Could these be inline functions?

I am actually not seeing these macros being used anywhere. These macros were
added recently [commit ID: 7884fc0a1473c2721f496f1d1ddc9d2c91aefa53] in 2021. I
am unsure if they are intended to be used in the future or can removed entirely.

Making these inline functions can be done, however, will we need to measure
performance impact? I will need help and time for this evaluation.

Let me know what you think is right thing to do here.

Thank you,
./drv

>
> julia






[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