From: Deepak R Varma <drv@mailo.com>
To: Julia Lawall <julia.lawall@inria.fr>
Cc: outreachy@lists.linux.dev, Larry.Finger@lwfinger.net,
phil@philpotter.co.uk, paskripkin@gmail.com,
gregkh@linuxfoundation.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org, kumarpraveen@linux.microsoft.com,
saurabh.truth@gmail.com
Subject: Re: [PATCH v3 06/10] staging: r8188eu: Add space between function & macro parameters
Date: Thu, 20 Oct 2022 15:32:02 +0530 [thread overview]
Message-ID: <Y1EcmphZyExVVttR@debian-BULLSEYE-live-builder-AMD64> (raw)
In-Reply-To: <114d7521-a15-9569-cb38-69f4bb8990f7@inria.fr>
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
next prev parent reply other threads:[~2022-10-20 10:02 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-20 7:52 [PATCH v3 00/10] staging: r8188eu: trivial code cleanup patches Deepak R Varma
2022-10-20 7:52 ` [PATCH v3 01/10] staging: r8188eu: use Linux kernel variable naming convention Deepak R Varma
2022-10-20 15:48 ` Greg KH
2022-10-20 16:28 ` Deepak R Varma
2022-10-20 7:53 ` [PATCH v3 02/10] staging: r8188eu: reformat long computation lines Deepak R Varma
2022-10-20 7:54 ` [PATCH v3 03/10] staging: r8188eu: remove {} for single statement blocks Deepak R Varma
2022-10-20 7:54 ` [PATCH v3 04/10] staging: r8188eu: use htons macro instead of __constant_htons Deepak R Varma
2022-10-20 7:55 ` [PATCH v3 05/10] staging: r8188eu: correct misspelled words in comments Deepak R Varma
2022-10-20 8:22 ` Dan Carpenter
2022-10-20 8:32 ` Deepak R Varma
2022-10-20 9:12 ` Julia Lawall
2022-10-20 9:18 ` Deepak R Varma
2022-10-20 9:24 ` Julia Lawall
2022-10-20 7:56 ` [PATCH v3 06/10] staging: r8188eu: Add space between function & macro parameters Deepak R Varma
2022-10-20 9:17 ` Julia Lawall
2022-10-20 10:02 ` Deepak R Varma [this message]
2022-10-20 10:21 ` Julia Lawall
2022-10-20 10:35 ` Deepak R Varma
2022-10-20 20:54 ` Deepak R Varma
2022-10-20 7:57 ` [PATCH v3 07/10] staging: r8188eu: Associate pointer symbol with parameter name Deepak R Varma
2022-10-20 7:58 ` [PATCH v3 08/10] staging: r8188eu: replace leading spaces by tabs Deepak R Varma
2022-10-20 7:59 ` [PATCH v3 09/10] staging: r8188eu: Put '{" on the symbol declaration line Deepak R Varma
2022-10-20 7:59 ` [PATCH v3 10/10] staging: r8188eu: Correct missing or extra space in the statements Deepak R Varma
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y1EcmphZyExVVttR@debian-BULLSEYE-live-builder-AMD64 \
--to=drv@mailo.com \
--cc=Larry.Finger@lwfinger.net \
--cc=gregkh@linuxfoundation.org \
--cc=julia.lawall@inria.fr \
--cc=kumarpraveen@linux.microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=outreachy@lists.linux.dev \
--cc=paskripkin@gmail.com \
--cc=phil@philpotter.co.uk \
--cc=saurabh.truth@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®