* [PATCH v4] staging: vt6655f: rxtx: code style - Fix Lines should not end with a '('
@ 2022-04-15 5:19 Aliya Rahmani
2022-04-15 5:44 ` Fabio M. De Francesco
2022-04-15 11:31 ` Julia Lawall
0 siblings, 2 replies; 4+ messages in thread
From: Aliya Rahmani @ 2022-04-15 5:19 UTC (permalink / raw)
To: forest; +Cc: gregkh, linux-staging, outreachy, Aliya Rahmani
Code style warnings reported by checkpatch.
Improve the layout of a function header:
*Put the first parameter immediately after the '(' and align the other
parameters underneath it.
Signed-off-by: Aliya Rahmani <aliyarahmani786@gmail.com>
---
v1->v2 changes: Put static and void on a single line.
v2->v3->v4 changes: Rework commit description.
---
drivers/staging/vt6655/rxtx.c | 23 ++++++++++-------------
1 file changed, 10 insertions(+), 13 deletions(-)
diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index 53506e242a96..01dc83b2f4bc 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -567,19 +567,16 @@ s_uFillDataHead(
return buf->duration;
}
-static
-void
-s_vFillRTSHead(
- struct vnt_private *pDevice,
- unsigned char byPktType,
- void *pvRTS,
- unsigned int cbFrameLength,
- bool bNeedAck,
- bool bDisCRC,
- struct ieee80211_hdr *hdr,
- unsigned short wCurrentRate,
- unsigned char byFBOption
-)
+static void
+s_vFillRTSHead(struct vnt_private *pDevice,
+ unsigned char byPktType,
+ void *pvRTS,
+ unsigned int cbFrameLength,
+ bool bNeedAck,
+ bool bDisCRC,
+ struct ieee80211_hdr *hdr,
+ unsigned short wCurrentRate,
+ unsigned char byFBOption)
{
unsigned int uRTSFrameLen = 20;
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v4] staging: vt6655f: rxtx: code style - Fix Lines should not end with a '('
2022-04-15 5:19 [PATCH v4] staging: vt6655f: rxtx: code style - Fix Lines should not end with a '(' Aliya Rahmani
@ 2022-04-15 5:44 ` Fabio M. De Francesco
2022-04-15 9:08 ` Julia Lawall
2022-04-15 11:31 ` Julia Lawall
1 sibling, 1 reply; 4+ messages in thread
From: Fabio M. De Francesco @ 2022-04-15 5:44 UTC (permalink / raw)
To: forest, Aliya Rahmani; +Cc: gregkh, linux-staging, outreachy, Aliya Rahmani
Hi Aliya,
I think that the subject of your patch can be reduced a bit. For example,
why don't you remove that "code style -"?
On venerdì 15 aprile 2022 07:19:01 CEST Aliya Rahmani wrote:
> Code style warnings reported by checkpatch.
> Improve the layout of a function header:
> *Put the first parameter immediately after the '(' and align the other
> parameters underneath it.
You are doing two different things. Please only one logical change per
patch. Furthermore, why that "*" before "Put"?
>
> Signed-off-by: Aliya Rahmani <aliyarahmani786@gmail.com>
> ---
> v1->v2 changes: Put static and void on a single line.
>
> v2->v3->v4 changes: Rework commit description.
>
> ---
> drivers/staging/vt6655/rxtx.c | 23 ++++++++++-------------
> 1 file changed, 10 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/
rxtx.c
> index 53506e242a96..01dc83b2f4bc 100644
> --- a/drivers/staging/vt6655/rxtx.c
> +++ b/drivers/staging/vt6655/rxtx.c
> @@ -567,19 +567,16 @@ s_uFillDataHead(
> return buf->duration;
> }
>
> -static
> -void
> -s_vFillRTSHead(
> - struct vnt_private *pDevice,
> - unsigned char byPktType,
> - void *pvRTS,
> - unsigned int cbFrameLength,
> - bool bNeedAck,
> - bool bDisCRC,
> - struct ieee80211_hdr *hdr,
> - unsigned short wCurrentRate,
> - unsigned char byFBOption
> -)
> +static void
Why storage class and function type are on a separate line? Is it a special
convention for this driver?
> +s_vFillRTSHead(struct vnt_private *pDevice,
> + unsigned char byPktType,
> + void *pvRTS,
> + unsigned int cbFrameLength,
> + bool bNeedAck,
> + bool bDisCRC,
> + struct ieee80211_hdr *hdr,
> + unsigned short wCurrentRate,
> + unsigned char byFBOption)
> {
> unsigned int uRTSFrameLen = 20;
>
> --
> 2.25.1
Thanks,
Fabio M. De Francesco
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v4] staging: vt6655f: rxtx: code style - Fix Lines should not end with a '('
2022-04-15 5:44 ` Fabio M. De Francesco
@ 2022-04-15 9:08 ` Julia Lawall
0 siblings, 0 replies; 4+ messages in thread
From: Julia Lawall @ 2022-04-15 9:08 UTC (permalink / raw)
To: Fabio M. De Francesco
Cc: forest, Aliya Rahmani, gregkh, linux-staging, outreachy
[-- Attachment #1: Type: text/plain, Size: 2165 bytes --]
On Fri, 15 Apr 2022, Fabio M. De Francesco wrote:
> Hi Aliya,
>
> I think that the subject of your patch can be reduced a bit. For example,
> why don't you remove that "code style -"?
>
> On venerdì 15 aprile 2022 07:19:01 CEST Aliya Rahmani wrote:
> > Code style warnings reported by checkpatch.
> > Improve the layout of a function header:
> > *Put the first parameter immediately after the '(' and align the other
> > parameters underneath it.
>
> You are doing two different things. Please only one logical change per
> patch. Furthermore, why that "*" before "Put"?
I think that fixing up a function header could be considered to be one
thing?
But the subject line should reflect the complete one thing.
julia
>
> >
> > Signed-off-by: Aliya Rahmani <aliyarahmani786@gmail.com>
> > ---
> > v1->v2 changes: Put static and void on a single line.
> >
> > v2->v3->v4 changes: Rework commit description.
> >
> > ---
> > drivers/staging/vt6655/rxtx.c | 23 ++++++++++-------------
> > 1 file changed, 10 insertions(+), 13 deletions(-)
> >
> > diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/
> rxtx.c
> > index 53506e242a96..01dc83b2f4bc 100644
> > --- a/drivers/staging/vt6655/rxtx.c
> > +++ b/drivers/staging/vt6655/rxtx.c
> > @@ -567,19 +567,16 @@ s_uFillDataHead(
> > return buf->duration;
> > }
> >
> > -static
> > -void
> > -s_vFillRTSHead(
> > - struct vnt_private *pDevice,
> > - unsigned char byPktType,
> > - void *pvRTS,
> > - unsigned int cbFrameLength,
> > - bool bNeedAck,
> > - bool bDisCRC,
> > - struct ieee80211_hdr *hdr,
> > - unsigned short wCurrentRate,
> > - unsigned char byFBOption
> > -)
> > +static void
>
> Why storage class and function type are on a separate line? Is it a special
> convention for this driver?
>
> > +s_vFillRTSHead(struct vnt_private *pDevice,
> > + unsigned char byPktType,
> > + void *pvRTS,
> > + unsigned int cbFrameLength,
> > + bool bNeedAck,
> > + bool bDisCRC,
> > + struct ieee80211_hdr *hdr,
> > + unsigned short wCurrentRate,
> > + unsigned char byFBOption)
> > {
> > unsigned int uRTSFrameLen = 20;
> >
> > --
> > 2.25.1
>
> Thanks,
>
> Fabio M. De Francesco
>
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v4] staging: vt6655f: rxtx: code style - Fix Lines should not end with a '('
2022-04-15 5:19 [PATCH v4] staging: vt6655f: rxtx: code style - Fix Lines should not end with a '(' Aliya Rahmani
2022-04-15 5:44 ` Fabio M. De Francesco
@ 2022-04-15 11:31 ` Julia Lawall
1 sibling, 0 replies; 4+ messages in thread
From: Julia Lawall @ 2022-04-15 11:31 UTC (permalink / raw)
To: Aliya Rahmani; +Cc: forest, gregkh, linux-staging, outreachy
On Fri, 15 Apr 2022, Aliya Rahmani wrote:
> Code style warnings reported by checkpatch.
> Improve the layout of a function header:
> *Put the first parameter immediately after the '(' and align the other
> parameters underneath it.
The subject line should cover the whole patch, not just part of it.
Similarly, I guess checkpatch just warned about the (, not about the whole
thing.
The log message should mention about static void.
There should be no * in front of "Put".
julia
>
> Signed-off-by: Aliya Rahmani <aliyarahmani786@gmail.com>
> ---
> v1->v2 changes: Put static and void on a single line.
>
> v2->v3->v4 changes: Rework commit description.
>
> ---
> drivers/staging/vt6655/rxtx.c | 23 ++++++++++-------------
> 1 file changed, 10 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
> index 53506e242a96..01dc83b2f4bc 100644
> --- a/drivers/staging/vt6655/rxtx.c
> +++ b/drivers/staging/vt6655/rxtx.c
> @@ -567,19 +567,16 @@ s_uFillDataHead(
> return buf->duration;
> }
>
> -static
> -void
> -s_vFillRTSHead(
> - struct vnt_private *pDevice,
> - unsigned char byPktType,
> - void *pvRTS,
> - unsigned int cbFrameLength,
> - bool bNeedAck,
> - bool bDisCRC,
> - struct ieee80211_hdr *hdr,
> - unsigned short wCurrentRate,
> - unsigned char byFBOption
> -)
> +static void
> +s_vFillRTSHead(struct vnt_private *pDevice,
> + unsigned char byPktType,
> + void *pvRTS,
> + unsigned int cbFrameLength,
> + bool bNeedAck,
> + bool bDisCRC,
> + struct ieee80211_hdr *hdr,
> + unsigned short wCurrentRate,
> + unsigned char byFBOption)
> {
> unsigned int uRTSFrameLen = 20;
>
> --
> 2.25.1
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-04-15 11:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-15 5:19 [PATCH v4] staging: vt6655f: rxtx: code style - Fix Lines should not end with a '(' Aliya Rahmani
2022-04-15 5:44 ` Fabio M. De Francesco
2022-04-15 9:08 ` Julia Lawall
2022-04-15 11:31 ` Julia Lawall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox