Skip to contentSkip to conversation

staging: vt6655f: rxtx: code style - Fix Lines should not end with a '('

PATCH Superseded Aliya Rahmani 2 participants 3 messages Apr 13, 2022 3 messages not in the archive Staging

v2 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 staging: vt6655f: rxtx: code style - Fix Lines should not end with a '('

Remove indentation to fix the checkpatch error that lines should not end with a '('.

---

v1->v2: Add Indentation and remove the gap between static and void.

---
 drivers/staging/vt6655/rxtx.c | 23 ++++++++++-------------
 1 file changed, 10 insertions(+), 13 deletions(-)
drivers/staging/vt6655/rxtx.c +10 -13
index 53506e242a96..01dc83b2f4bc 100644
@@ -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
#1 lore raw
Quoted 2 lines · Aliya Rahmani

Remove indentation to fix the checkpatch error that lines should not end with a '('.

This comment doesn't completely describe what was done.

julia

Quoted 49 lines

---

v1->v2: Add Indentation and remove the gap between static and void.

---
 drivers/staging/vt6655/rxtx.c | 23 ++++++++++-------------
 1 file changed, 10 insertions(+), 13 deletions(-)
drivers/staging/vt6655/rxtx.c +10 -14
index 53506e242a96..01dc83b2f4bc 100644
@@ -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

A message that is not in the archive (sent off-list or not yet received): CAGTWmRErQT7-9sn=KEWdQOiamYgG0+k4PxuK-qp7R+VhsLS-dg@mail.gmail.com

A message that is not in the archive (sent off-list or not yet received): alpine.DEB.2.22.394.2204131310550.3091@hadrien

A message that is not in the archive (sent off-list or not yet received): CAGTWmRG0hZAqOczhMKuUb8pQXHGYPPFHtcc+-6synWoAg_bTEA@mail.gmail.com

#5 lore raw
Quoted 79 lines · Aliya
Quoted 78 lines · Julia Lawall
Quoted 66 lines · Aliya
Quoted 56 lines · Julia Lawall
Quoted 2 lines · Aliya Rahmani

Remove indentation to fix the checkpatch error that lines should not end with a '('.

This comment doesn't completely describe what was done.

julia

Quoted 44 lines

---

v1->v2: Add Indentation and remove the gap between static and void.

---
 drivers/staging/vt6655/rxtx.c | 23 ++++++++++-------------
 1 file changed, 10 insertions(+), 13 deletions(-)
drivers/staging/vt6655/rxtx.c +10 -13
index 53506e242a96..01dc83b2f4bc 100644
@@ -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;
 
Quoted 5 lines
Quoted 5 lines

--
2.25.1

Remove indentation and spacing to avoid warnings. Identified by checkpatch: CHECK: Lines should not end with a '('.

Quoted 1 line

Is this okay?

No. "Remove indentation" is not understandable because you have increased the indentation of all the other parameters. You also removed a newline in front of the first parameter. And you removed a newline in between static and void.

Quoted 8 lines
Quoted 1 line

julia

Changes applied to fix checkpatch.pl warnings :
1. Removed newline in front of 'struct vnt_private *pDevice'.
2. Removed newline in between static and void.
3. Increased indentation to structure the code.

Please suggest any changes, I'm new to kernel programming.

[Added back the mailing list]

I think it would be better to take a more high level point of view.

Improve the layout of a function header:
* Put static and void on a single line.
* Put the first parameter immediately after the ( and align the other parameters underneath it.

julia