staging: vt6655f: rxtx: code style - Fix Lines should not end with a '('
PATCH v4 1/1 staging: vt6655f: rxtx: code style - Fix Lines should not end with a '('
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.
---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(-)
drivers/staging/vt6655/rxtx.c +10 -13
@@ -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 ;
Signature · 1 line
2.25.1
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 -"?
Quoted 4 lines · 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"?
drivers/staging/vt6655/
Quoted 12 lines
Signed-off-by Aliya Rahmani <[email protected]>---
v1->v2changes: Put static and void on a single line.
v2->v3->v4changes: Rework commit description.--- drivers/staging/vt6655/rxtx.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-)drivers/staging/vt6655/ renamed from drivers/staging/vt6655/rxtx.c +0
-0
rxtx.c
Quoted 11 lines
index
53506e242a96..01dc83b2f4bc100644drivers/staging/vt6655/rxtx.c +0
-4@@ -567,19 +567,16 @@ s_uFillDataHead(return buf->duration; } -static -void -s_vFillRTSHead( - struct vnt_private *pDevice,
drivers/staging/vt6655/rxtx.c s_uFillDataHead( · line 570
Quoted 10 lines
drivers/staging/vt6655/rxtx.c +1
-9-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?
Quoted 14 lines
drivers/staging/vt6655/rxtx.c +9
-0+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;Signature · 1 line
2.25.1
Thanks,
Fabio M. De Francesco
Quoted 5 lines · Fabio M. De Francesco
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 -"?
Quoted 8 lines
Quoted 4 lines · 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
Quoted 61 lines
drivers/staging/vt6655/
Quoted 13 lines
Signed-off-by Aliya Rahmani <[email protected]>---
v1->v2changes: Put static and void on a single line.
v2->v3->v4changes: Rework commit description.--- drivers/staging/vt6655/rxtx.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-)drivers/staging/vt6655/ renamed from drivers/staging/vt6655/rxtx.c +0
-0
rxtx.cQuoted 11 lines
index
53506e242a96..01dc83b2f4bc100644drivers/staging/vt6655/rxtx.c +0
-4@@ -567,19 +567,16 @@ s_uFillDataHead(return buf->duration; } -static -void -s_vFillRTSHead( - struct vnt_private *pDevice,drivers/staging/vt6655/rxtx.c s_uFillDataHead( · line 570
Quoted 10 lines
drivers/staging/vt6655/rxtx.c +1
-9-unsigned char byPktType, - void *pvRTS, - unsigned int cbFrameLength, - bool bNeedAck, - bool bDisCRC, - struct ieee80211_hdr *hdr, - unsigned short wCurrentRate, - unsigned char byFBOption -) +static voidWhy storage class and function type are on a separate line? Is it a special convention for this driver?
Quoted 13 lines
drivers/staging/vt6655/rxtx.c +9
-1+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; --Quoted 1 line
2.25.1
Thanks,
Fabio M. De Francesco
Quoted 4 lines · 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.
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
Quoted 50 lines
Signed-off-by Aliya Rahmani <[email protected]>---
v1->v2changes: Put static and void on a single line.
v2->v3->v4changes: Rework commit description.--- drivers/staging/vt6655/rxtx.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-)drivers/staging/vt6655/rxtx.c +10
-14@@ -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