linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: vt6655: Fix Lines should not end with a '('
@ 2022-10-19 16:05 Tanjuate Brunostar
  2022-10-19 17:00 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Tanjuate Brunostar @ 2022-10-19 16:05 UTC (permalink / raw)
  To: greg, forest, linux-staging, linux-kernel, outreachy

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>
---
 drivers/staging/vt6655/rxtx.c | 44 ++++++++++++++++-------------------
 1 file changed, 20 insertions(+), 24 deletions(-)

diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index 5bdb5176772c..ff855def0bd5 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -87,33 +87,29 @@ static const unsigned short wFB_Opt1[2][5] = {
 /*---------------------  Static Functions  --------------------------*/
 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
-);
+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_vGenerateTxParameter(
-	struct vnt_private *pDevice,
-	unsigned char byPktType,
-	struct vnt_tx_fifo_head *,
-	void *pvRrvTime,
-	void *pvRTS,
-	void *pvCTS,
-	unsigned int	cbFrameSize,
-	bool bNeedACK,
-	unsigned int	uDMAIdx,
-	void *psEthHeader,
-	unsigned short wCurrentRate
-);
+s_vGenerateTxParameter(struct vnt_private *pDevice,
+		unsigned char byPktType,
+		struct vnt_tx_fifo_head *,
+		void *pvRrvTime,
+		void *pvRTS,
+		void *pvCTS,
+		unsigned int	cbFrameSize,
+		bool bNeedACK,
+		unsigned int	uDMAIdx,
+		void *psEthHeader,
+		unsigned short wCurrentRate);
 
 static unsigned int
 s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] staging: vt6655: Fix Lines should not end with a '('
  2022-10-19 16:05 [PATCH] staging: vt6655: Fix Lines should not end with a '(' Tanjuate Brunostar
@ 2022-10-19 17:00 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2022-10-19 17:00 UTC (permalink / raw)
  To: Tanjuate Brunostar; +Cc: forest, linux-staging, linux-kernel, outreachy

On Wed, Oct 19, 2022 at 04:05:06PM +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>
> ---
>  drivers/staging/vt6655/rxtx.c | 44 ++++++++++++++++-------------------
>  1 file changed, 20 insertions(+), 24 deletions(-)
> 
> diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
> index 5bdb5176772c..ff855def0bd5 100644
> --- a/drivers/staging/vt6655/rxtx.c
> +++ b/drivers/staging/vt6655/rxtx.c
> @@ -87,33 +87,29 @@ static const unsigned short wFB_Opt1[2][5] = {
>  /*---------------------  Static Functions  --------------------------*/
>  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
> -);
> +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);

Why not also put the "static void" on the same line as the function
name?

>  
>  static
>  void
> -s_vGenerateTxParameter(
> -	struct vnt_private *pDevice,
> -	unsigned char byPktType,
> -	struct vnt_tx_fifo_head *,
> -	void *pvRrvTime,
> -	void *pvRTS,
> -	void *pvCTS,
> -	unsigned int	cbFrameSize,
> -	bool bNeedACK,
> -	unsigned int	uDMAIdx,
> -	void *psEthHeader,
> -	unsigned short wCurrentRate
> -);
> +s_vGenerateTxParameter(struct vnt_private *pDevice,
> +		unsigned char byPktType,
> +		struct vnt_tx_fifo_head *,
> +		void *pvRrvTime,
> +		void *pvRTS,
> +		void *pvCTS,
> +		unsigned int	cbFrameSize,
> +		bool bNeedACK,
> +		unsigned int	uDMAIdx,
> +		void *psEthHeader,
> +		unsigned short wCurrentRate);

I do not understand this indentation at all, how did you choose it?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-19 17:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-19 16:05 [PATCH] staging: vt6655: Fix Lines should not end with a '(' Tanjuate Brunostar
2022-10-19 17:00 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).