All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] staging: vt6655: a series of checkpatch fixes on
@ 2022-10-20 18:27 Tanjuate Brunostar
  2022-10-20 18:27 ` [PATCH 1/6] staging: vt6655: fix lines ending in a '(' Tanjuate Brunostar
                   ` (6 more replies)
  0 siblings, 7 replies; 17+ messages in thread
From: Tanjuate Brunostar @ 2022-10-20 18:27 UTC (permalink / raw)
  To: forest; +Cc: greg, linux-staging, linux-kernel, outreachy, Tanjuate Brunostar

The fixes are similar, mostly long lines splitting. I had to make
serveral patches to ease the work of inspectors

Tanjuate Brunostar (6):
  staging: vt6655: fix lines ending in a '('
  staging: vt6655: refactor long lines of code in s_uGetRTSCTSDuration
  staging: vt6655: refactor long lines of code in s_uFillDataHead
  staging: vt6655: refactor long lines of code in s_vGenerateTxParameter
  staging: vt6655: refactor long lines of code in the rest of the file
  staging: vt6655: refactor code to avoid a line ending in '('

 drivers/staging/vt6655/rxtx.c | 535 ++++++++++++++++++++--------------
 1 file changed, 323 insertions(+), 212 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 17+ messages in thread
* [PATCH v3] staging: vt6655: Fix Lines should not end with a '('
@ 2022-10-20 11:30 Tanjuate Brunostar
  2022-10-20 15:00 ` Greg KH
  0 siblings, 1 reply; 17+ messages in thread
From: Tanjuate Brunostar @ 2022-10-20 11:30 UTC (permalink / raw)
  To: gregkh, 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>

---
v2: put static and void on the same line and adjusted the indentation as
suggested by Greg KH
---
v3: Reformat the code by inserting tabs and white space as recommended
by Nam Cao and Julia Lawall

 drivers/staging/vt6655/rxtx.c | 78 +++++++++++++++--------------------
 1 file changed, 33 insertions(+), 45 deletions(-)

diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index 5bdb5176772c..1e5036121665 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -85,35 +85,27 @@ static const unsigned short wFB_Opt1[2][5] = {
 #define DATADUR_A_F1    13
 
 /*---------------------  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
-);
-
-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
-);
+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_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,
@@ -121,22 +113,18 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
 		  unsigned int uDMAIdx, struct vnt_tx_desc *pHeadTD,
 		  unsigned int uNodeIndex);
 
-static
-__le16
-s_uFillDataHead(
-	struct vnt_private *pDevice,
-	unsigned char byPktType,
-	void *pTxDataHead,
-	unsigned int cbFrameLength,
-	unsigned int uDMAIdx,
-	bool bNeedAck,
-	unsigned int uFragIdx,
-	unsigned int cbLastFragmentSize,
-	unsigned int uMACfragNum,
-	unsigned char byFBOption,
-	unsigned short wCurrentRate,
-	bool is_pspoll
-);
+static __le16 s_uFillDataHead(struct vnt_private *pDevice,
+			      unsigned char byPktType,
+			      void *pTxDataHead,
+			      unsigned int cbFrameLength,
+			      unsigned int uDMAIdx,
+			      bool bNeedAck,
+			      unsigned int uFragIdx,
+			      unsigned int cbLastFragmentSize,
+			      unsigned int uMACfragNum,
+			      unsigned char byFBOption,
+			      unsigned short wCurrentRate,
+			      bool is_pspoll);
 
 /*---------------------  Export Variables  --------------------------*/
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread
* [PATCH v3] staging: vt6655: Fix Lines should not end with a '('
@ 2022-10-20 10:56 Tanjuate Brunostar
  2022-10-20 11:10 ` Nam Cao
  0 siblings, 1 reply; 17+ messages in thread
From: Tanjuate Brunostar @ 2022-10-20 10:56 UTC (permalink / raw)
  To: outreachy, greg, forest, linux-staging, linux-kernel

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(-)

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,
-- 
2.34.1


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

end of thread, other threads:[~2022-10-21  7:22 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-20 18:27 [PATCH 0/6] staging: vt6655: a series of checkpatch fixes on Tanjuate Brunostar
2022-10-20 18:27 ` [PATCH 1/6] staging: vt6655: fix lines ending in a '(' Tanjuate Brunostar
2022-10-20 18:27 ` [PATCH 2/6] staging: vt6655: refactor long lines of code in s_uGetRTSCTSDuration Tanjuate Brunostar
2022-10-20 18:27 ` [PATCH 3/6] staging: vt6655: refactor long lines of code in s_uFillDataHead Tanjuate Brunostar
2022-10-20 18:27 ` [PATCH 4/6] staging: vt6655: refactor long lines of code in s_vGenerateTxParameter Tanjuate Brunostar
2022-10-20 21:17   ` kernel test robot
2022-10-21  4:41   ` kernel test robot
2022-10-21  7:10   ` Praveen Kumar
2022-10-21  7:16     ` Julia Lawall
2022-10-21  7:21       ` Tanju Brunostar
2022-10-20 18:27 ` [PATCH 5/6] staging: vt6655: refactor long lines of code in the rest of the file Tanjuate Brunostar
2022-10-20 18:27 ` [PATCH 6/6] staging: vt6655: refactor code to avoid a line ending in '(' Tanjuate Brunostar
2022-10-20 18:27 ` [PATCH v3] staging: vt6655: Fix Lines should not end with a '(' Tanjuate Brunostar
  -- strict thread matches above, loose matches on Subject: below --
2022-10-20 11:30 Tanjuate Brunostar
2022-10-20 15:00 ` Greg KH
2022-10-20 10:56 Tanjuate Brunostar
2022-10-20 11:10 ` Nam Cao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.