[v2] staging: vt6655: Fix Lines should not end with a '('

Message ID Y1BN6wPMrpxPB3qP@elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net
State New
Headers
Series [v2] staging: vt6655: Fix Lines should not end with a '(' |

Commit Message

Tanjuate Brunostar Oct. 19, 2022, 7:20 p.m. UTC
  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: Tanjuate Brunostar <tanjubrunostar0@gmail.com>

---
v2: put static and void on the same line and adjusted the indentation as
suggested by Greg KH

 drivers/staging/vt6655/rxtx.c | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)
  

Comments

Nam Cao Oct. 19, 2022, 10:34 p.m. UTC | #1
On Wed, Oct 19, 2022 at 07:20:11PM +0000, Tanjuate Brunostar 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.
> 
> Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com>
> 
> ---
> v2: put static and void on the same line and adjusted the indentation as
> suggested by Greg KH

I think he meant putting "static" and "void" and also function name on
the same line.

Additionally, I think your patch introduces new checkpatch problems. Did
you run checkpatch.pl on your patch?

Best regards,
Nam
  
Tanjuate Brunostar Oct. 20, 2022, 10:15 a.m. UTC | #2
On Wed, Oct 19, 2022 at 11:35 PM Nam Cao <namcaov@gmail.com> wrote:
>
> On Wed, Oct 19, 2022 at 07:20:11PM +0000, Tanjuate Brunostar 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.
> >
> > Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com>
> >
> > ---
> > v2: put static and void on the same line and adjusted the indentation as
> > suggested by Greg KH
>
> I think he meant putting "static" and "void" and also function name on
> the same line.
>
Oh I will do this now. thanks

> Additionally, I think your patch introduces new checkpatch problems. Did
> you run checkpatch.pl on your patch?
>
> Best regards,
> Nam
>
Yes I did. the checkpatch says this:
Alignment should match open parenthesis
#89: FILE: drivers/staging/vt6655/rxtx.c:89:
+static void s_vFillRTSHead(struct vnt_private *pDevice,
+               unsigned char byPktType,

The only way to resolve this would be to add white space which would
generate another checkpatch problem. how do i fix this please?
  
Julia Lawall Oct. 20, 2022, 10:18 a.m. UTC | #3
On Thu, 20 Oct 2022, Tanju Brunostar wrote:

> On Wed, Oct 19, 2022 at 11:35 PM Nam Cao <namcaov@gmail.com> wrote:
> >
> > On Wed, Oct 19, 2022 at 07:20:11PM +0000, Tanjuate Brunostar 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.
> > >
> > > Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com>
> > >
> > > ---
> > > v2: put static and void on the same line and adjusted the indentation as
> > > suggested by Greg KH
> >
> > I think he meant putting "static" and "void" and also function name on
> > the same line.
> >
> Oh I will do this now. thanks
>
> > Additionally, I think your patch introduces new checkpatch problems. Did
> > you run checkpatch.pl on your patch?
> >
> > Best regards,
> > Nam
> >
> Yes I did. the checkpatch says this:
> Alignment should match open parenthesis
> #89: FILE: drivers/staging/vt6655/rxtx.c:89:
> +static void s_vFillRTSHead(struct vnt_private *pDevice,
> +               unsigned char byPktType,
>
> The only way to resolve this would be to add white space which would
> generate another checkpatch problem. how do i fix this please?

You mean that the ( is not at a point that is a precise multiple of the
tab size?  You can put as many tabs as possible and then use spaces
afterwards.

julia
  
Tanjuate Brunostar Oct. 20, 2022, 10:29 a.m. UTC | #4
On Thu, Oct 20, 2022 at 11:18 AM Julia Lawall <julia.lawall@inria.fr> wrote:
>
>
>
> On Thu, 20 Oct 2022, Tanju Brunostar wrote:
>
> > On Wed, Oct 19, 2022 at 11:35 PM Nam Cao <namcaov@gmail.com> wrote:
> > >
> > > On Wed, Oct 19, 2022 at 07:20:11PM +0000, Tanjuate Brunostar 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.
> > > >
> > > > Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com>
> > > >
> > > > ---
> > > > v2: put static and void on the same line and adjusted the indentation as
> > > > suggested by Greg KH
> > >
> > > I think he meant putting "static" and "void" and also function name on
> > > the same line.
> > >
> > Oh I will do this now. thanks
> >
> > > Additionally, I think your patch introduces new checkpatch problems. Did
> > > you run checkpatch.pl on your patch?
> > >
> > > Best regards,
> > > Nam
> > >
> > Yes I did. the checkpatch says this:
> > Alignment should match open parenthesis
> > #89: FILE: drivers/staging/vt6655/rxtx.c:89:
> > +static void s_vFillRTSHead(struct vnt_private *pDevice,
> > +               unsigned char byPktType,
> >
> > The only way to resolve this would be to add white space which would
> > generate another checkpatch problem. how do i fix this please?
>
> You mean that the ( is not at a point that is a precise multiple of the
> tab size?  You can put as many tabs as possible and then use spaces
> afterwards.
>
> julia
It works. Thank you
  

Patch

diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index 5bdb5176772c..d987f7dff02a 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -85,10 +85,8 @@  static const unsigned short wFB_Opt1[2][5] = {
 #define DATADUR_A_F1    13
 
 /*---------------------  Static Functions  --------------------------*/
-static
-void
-s_vFillRTSHead(
-	struct vnt_private *pDevice,
+static void
+s_vFillRTSHead(struct vnt_private *pDevice,
 	unsigned char byPktType,
 	void *pvRTS,
 	unsigned int	cbFrameLength,
@@ -96,13 +94,10 @@  s_vFillRTSHead(
 	bool bDisCRC,
 	struct ieee80211_hdr *hdr,
 	unsigned short wCurrentRate,
-	unsigned char byFBOption
-);
+	unsigned char byFBOption);
 
-static
-void
-s_vGenerateTxParameter(
-	struct vnt_private *pDevice,
+static void
+s_vGenerateTxParameter(struct vnt_private *pDevice,
 	unsigned char byPktType,
 	struct vnt_tx_fifo_head *,
 	void *pvRrvTime,
@@ -112,8 +107,7 @@  s_vGenerateTxParameter(
 	bool bNeedACK,
 	unsigned int	uDMAIdx,
 	void *psEthHeader,
-	unsigned short wCurrentRate
-);
+	unsigned short wCurrentRate);
 
 static unsigned int
 s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,