[v3,06/10] staging: r8188eu: Add space between function & macro parameters
Commit Message
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@mailo.com>
---
Changes in v3:
1. Patch newly added to the patch set.
.../staging/r8188eu/include/osdep_service.h | 4 +--
.../staging/r8188eu/include/rtl8188e_hal.h | 2 +-
drivers/staging/r8188eu/include/rtw_cmd.h | 4 +--
drivers/staging/r8188eu/include/rtw_io.h | 28 +++++++++----------
4 files changed, 19 insertions(+), 19 deletions(-)
--
2.30.2
Comments
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@mailo.com>
> ---
>
> Changes in v3:
> 1. Patch newly added to the patch set.
>
>
>
> .../staging/r8188eu/include/osdep_service.h | 4 +--
> .../staging/r8188eu/include/rtl8188e_hal.h | 2 +-
> drivers/staging/r8188eu/include/rtw_cmd.h | 4 +--
> drivers/staging/r8188eu/include/rtw_io.h | 28 +++++++++----------
> 4 files changed, 19 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/include/osdep_service.h b/drivers/staging/r8188eu/include/osdep_service.h
> index 72990a1cdc66..ec2631455f08 100644
> --- a/drivers/staging/r8188eu/include/osdep_service.h
> +++ b/drivers/staging/r8188eu/include/osdep_service.h
> @@ -53,7 +53,7 @@ static inline struct list_head *get_list_head(struct __queue *queue)
> return (&(queue->queue));
> }
>
> -static inline void _set_timer(struct timer_list *ptimer,u32 delay_time)
> +static inline void _set_timer(struct timer_list *ptimer, u32 delay_time)
> {
> mod_timer(ptimer, jiffies + msecs_to_jiffies(delay_time));
> }
> @@ -108,7 +108,7 @@ void rtw_free_netdev(struct net_device *netdev);
> #define FUNC_ADPT_FMT "%s(%s)"
> #define FUNC_ADPT_ARG(adapter) __func__, adapter->pnetdev->name
>
> -#define rtw_signal_process(pid, sig) kill_pid(find_vpid((pid)),(sig), 1)
> +#define rtw_signal_process(pid, sig) kill_pid(find_vpid((pid)), (sig), 1)
>
> /* Macros for handling unaligned memory accesses */
>
> diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/staging/r8188eu/include/rtl8188e_hal.h
> index 25f9200b1151..577cd3f4f797 100644
> --- a/drivers/staging/r8188eu/include/rtl8188e_hal.h
> +++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h
> @@ -165,7 +165,7 @@ void Hal_ReadTxPowerInfo88E(struct adapter *padapter, u8 *hwinfo,
>
> void rtl8188e_EfuseParseChnlPlan(struct adapter *padapter, u8 *hwinfo,
> bool AutoLoadFail);
> -void Hal_ReadAntennaDiversity88E(struct adapter *pAdapter,u8 *PROMContent,
> +void Hal_ReadAntennaDiversity88E(struct adapter *pAdapter, u8 *PROMContent,
> bool AutoLoadFail);
> void Hal_ReadThermalMeter_88E(struct adapter * dapter, u8 *PROMContent,
> bool AutoloadFail);
> diff --git a/drivers/staging/r8188eu/include/rtw_cmd.h b/drivers/staging/r8188eu/include/rtw_cmd.h
> index d0d6c53e2aa7..e47382ac64a0 100644
> --- a/drivers/staging/r8188eu/include/rtw_cmd.h
> +++ b/drivers/staging/r8188eu/include/rtw_cmd.h
> @@ -740,7 +740,7 @@ u8 rtw_setopmode_cmd(struct adapter *padapter, enum ndis_802_11_network_infra n
> u8 rtw_setdatarate_cmd(struct adapter *padapter, u8 *rateset);
> u8 rtw_setrfintfs_cmd(struct adapter *padapter, u8 mode);
>
> -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.
>
> @@ -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 *.
> u8 rtw_ps_cmd(struct adapter*padapter);
>
> u8 rtw_chk_hi_queue_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 {
> };
>
> uint ioreq_flush(struct adapter *adapter, struct io_queue *ioqueue);
> -void sync_ioreq_enqueue(struct io_req *preq,struct io_queue *ioqueue);
> +void sync_ioreq_enqueue(struct io_req *preq, struct io_queue *ioqueue);
> uint sync_ioreq_flush(struct adapter *adapter, struct io_queue *ioqueue);
> uint free_ioreq(struct io_req *preq, struct io_queue *pio_queue);
> struct io_req *alloc_ioreq(struct io_queue *pio_q);
> @@ -285,18 +285,18 @@ void bus_sync_io(struct io_queue *pio_q);
> u32 _ioreq2rwmem(struct io_queue *pio_q);
> void dev_power_down(struct adapter *Adapter, u8 bpwrup);
>
> -#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?
julia
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@mailo.com>
> > ---
> >
> > 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
> > > -#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.
Inline functions shouldn't have any performance impact. For these simple
things the compiler should inline them.
The reason why a macro may be needed is if it is not possible to find a
single type for all of the possible argument values, or if some argument
values are assigned to by the macro definition, and not just read.
I would have suggested to look at all of the uses to see if there are any
concerns like this, but if there aren't any uses, that won't be possible.
There seems to be no special knowledge in these macros that is worth
preserving, so I think that they can just be dropped.
julia
On Thu, Oct 20, 2022 at 12:21:35PM +0200, Julia Lawall wrote:
> > > > -#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.
>
> Inline functions shouldn't have any performance impact. For these simple
> things the compiler should inline them.
Understood. For these simple cases, it should not.
>
> The reason why a macro may be needed is if it is not possible to find a
> single type for all of the possible argument values, or if some argument
> values are assigned to by the macro definition, and not just read.
Okay. This is helpful. Thank you.
>
> I would have suggested to look at all of the uses to see if there are any
> concerns like this, but if there aren't any uses, that won't be possible.
> There seems to be no special knowledge in these macros that is worth
> preserving, so I think that they can just be dropped.
Sounds good. I will drop them in the revision.
Thank you Julia.
./drv
>
> julia
>
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@mailo.com>
> > ---
> >
> > Changes in v3:
> > 1. Patch newly added to the patch set.
> >
> >
> >
> > .../staging/r8188eu/include/osdep_service.h | 4 +--
> > .../staging/r8188eu/include/rtl8188e_hal.h | 2 +-
> > drivers/staging/r8188eu/include/rtw_cmd.h | 4 +--
> > drivers/staging/r8188eu/include/rtw_io.h | 28 +++++++++----------
> > 4 files changed, 19 insertions(+), 19 deletions(-)
> >
> > diff --git a/drivers/staging/r8188eu/include/osdep_service.h b/drivers/staging/r8188eu/include/osdep_service.h
> > index 72990a1cdc66..ec2631455f08 100644
> > --- a/drivers/staging/r8188eu/include/osdep_service.h
> > +++ b/drivers/staging/r8188eu/include/osdep_service.h
> > @@ -53,7 +53,7 @@ static inline struct list_head *get_list_head(struct __queue *queue)
> > return (&(queue->queue));
> > }
> >
> > -static inline void _set_timer(struct timer_list *ptimer,u32 delay_time)
> > +static inline void _set_timer(struct timer_list *ptimer, u32 delay_time)
> > {
> > mod_timer(ptimer, jiffies + msecs_to_jiffies(delay_time));
> > }
> > @@ -108,7 +108,7 @@ void rtw_free_netdev(struct net_device *netdev);
> > #define FUNC_ADPT_FMT "%s(%s)"
> > #define FUNC_ADPT_ARG(adapter) __func__, adapter->pnetdev->name
> >
> > -#define rtw_signal_process(pid, sig) kill_pid(find_vpid((pid)),(sig), 1)
> > +#define rtw_signal_process(pid, sig) kill_pid(find_vpid((pid)), (sig), 1)
> >
> > /* Macros for handling unaligned memory accesses */
> >
> > diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/staging/r8188eu/include/rtl8188e_hal.h
> > index 25f9200b1151..577cd3f4f797 100644
> > --- a/drivers/staging/r8188eu/include/rtl8188e_hal.h
> > +++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h
> > @@ -165,7 +165,7 @@ void Hal_ReadTxPowerInfo88E(struct adapter *padapter, u8 *hwinfo,
> >
> > void rtl8188e_EfuseParseChnlPlan(struct adapter *padapter, u8 *hwinfo,
> > bool AutoLoadFail);
> > -void Hal_ReadAntennaDiversity88E(struct adapter *pAdapter,u8 *PROMContent,
> > +void Hal_ReadAntennaDiversity88E(struct adapter *pAdapter, u8 *PROMContent,
> > bool AutoLoadFail);
> > void Hal_ReadThermalMeter_88E(struct adapter * dapter, u8 *PROMContent,
> > bool AutoloadFail);
> > diff --git a/drivers/staging/r8188eu/include/rtw_cmd.h b/drivers/staging/r8188eu/include/rtw_cmd.h
> > index d0d6c53e2aa7..e47382ac64a0 100644
> > --- a/drivers/staging/r8188eu/include/rtw_cmd.h
> > +++ b/drivers/staging/r8188eu/include/rtw_cmd.h
> > @@ -740,7 +740,7 @@ u8 rtw_setopmode_cmd(struct adapter *padapter, enum ndis_802_11_network_infra n
> > u8 rtw_setdatarate_cmd(struct adapter *padapter, u8 *rateset);
> > u8 rtw_setrfintfs_cmd(struct adapter *padapter, u8 mode);
> >
> > -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.
Yes, noted.
>
> >
> > @@ -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 *.
Addressed in following patch since that is a different kind of issue to fix.
>
> > u8 rtw_ps_cmd(struct adapter*padapter);
> >
> > u8 rtw_chk_hi_queue_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 {
> > };
> >
> > uint ioreq_flush(struct adapter *adapter, struct io_queue *ioqueue);
> > -void sync_ioreq_enqueue(struct io_req *preq,struct io_queue *ioqueue);
> > +void sync_ioreq_enqueue(struct io_req *preq, struct io_queue *ioqueue);
> > uint sync_ioreq_flush(struct adapter *adapter, struct io_queue *ioqueue);
> > uint free_ioreq(struct io_req *preq, struct io_queue *pio_queue);
> > struct io_req *alloc_ioreq(struct io_queue *pio_q);
> > @@ -285,18 +285,18 @@ void bus_sync_io(struct io_queue *pio_q);
> > u32 _ioreq2rwmem(struct io_queue *pio_q);
> > void dev_power_down(struct adapter *Adapter, u8 bpwrup);
> >
> > -#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?
>
> julia
@@ -53,7 +53,7 @@ static inline struct list_head *get_list_head(struct __queue *queue)
return (&(queue->queue));
}
-static inline void _set_timer(struct timer_list *ptimer,u32 delay_time)
+static inline void _set_timer(struct timer_list *ptimer, u32 delay_time)
{
mod_timer(ptimer, jiffies + msecs_to_jiffies(delay_time));
}
@@ -108,7 +108,7 @@ void rtw_free_netdev(struct net_device *netdev);
#define FUNC_ADPT_FMT "%s(%s)"
#define FUNC_ADPT_ARG(adapter) __func__, adapter->pnetdev->name
-#define rtw_signal_process(pid, sig) kill_pid(find_vpid((pid)),(sig), 1)
+#define rtw_signal_process(pid, sig) kill_pid(find_vpid((pid)), (sig), 1)
/* Macros for handling unaligned memory accesses */
@@ -165,7 +165,7 @@ void Hal_ReadTxPowerInfo88E(struct adapter *padapter, u8 *hwinfo,
void rtl8188e_EfuseParseChnlPlan(struct adapter *padapter, u8 *hwinfo,
bool AutoLoadFail);
-void Hal_ReadAntennaDiversity88E(struct adapter *pAdapter,u8 *PROMContent,
+void Hal_ReadAntennaDiversity88E(struct adapter *pAdapter, u8 *PROMContent,
bool AutoLoadFail);
void Hal_ReadThermalMeter_88E(struct adapter * dapter, u8 *PROMContent,
bool AutoloadFail);
@@ -740,7 +740,7 @@ u8 rtw_setopmode_cmd(struct adapter *padapter, enum ndis_802_11_network_infra n
u8 rtw_setdatarate_cmd(struct adapter *padapter, u8 *rateset);
u8 rtw_setrfintfs_cmd(struct adapter *padapter, u8 mode);
-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);
@@ -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);
u8 rtw_ps_cmd(struct adapter*padapter);
u8 rtw_chk_hi_queue_cmd(struct adapter*padapter);
@@ -209,7 +209,7 @@ struct io_priv {
};
uint ioreq_flush(struct adapter *adapter, struct io_queue *ioqueue);
-void sync_ioreq_enqueue(struct io_req *preq,struct io_queue *ioqueue);
+void sync_ioreq_enqueue(struct io_req *preq, struct io_queue *ioqueue);
uint sync_ioreq_flush(struct adapter *adapter, struct io_queue *ioqueue);
uint free_ioreq(struct io_req *preq, struct io_queue *pio_queue);
struct io_req *alloc_ioreq(struct io_queue *pio_q);
@@ -285,18 +285,18 @@ void bus_sync_io(struct io_queue *pio_q);
u32 _ioreq2rwmem(struct io_queue *pio_q);
void dev_power_down(struct adapter *Adapter, u8 bpwrup);
-#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)
#endif /* _RTL8711_IO_H_ */