Skip to contentSkip to conversation

Fix coding style

PATCH Superseded Shivani Bhardwaj 2 participants 7 messages Oct 10, 2015 – Oct 11, 2015 Staging

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover Fix coding style

This patch fixes the warnings and errors generated by checkpatch about extra/missing characters.
After applying this patch, file has less warnings and errors.

Changes in v2:
-Make the commit message better and clearer.

Shivani Bhardwaj (2):
Staging: vt6655: rxtx: Remove unnecessary space character
Staging: vt6655: rxtx: Remove unnecessary parentheses

 drivers/staging/vt6655/rxtx.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
2.1.0
#1 lore raw

PATCH v2 1/2 Staging: vt6655: rxtx: Remove unnecessary space character

Remove unnecessary space character after the variable RATE_16M. Fixes the warning by checkpatch : space prohibited before that ',' (ctx:WxW)

---
Changes in v2:
-Make the commit message better and clearer.

 drivers/staging/vt6655/rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/vt6655/rxtx.c +1 -1
index 5875d65..a909128 100644
@@ -78,7 +78,7 @@ static const unsigned short wFB_Opt0[2][5] = {
 };
 static const unsigned short wFB_Opt1[2][5] = {
 	{RATE_12M, RATE_18M, RATE_24M, RATE_24M, RATE_36M}, /* fallback_rate0 */
-	{RATE_6M , RATE_6M,  RATE_12M, RATE_12M, RATE_18M}, /* fallback_rate1 */
+	{RATE_6M, RATE_6M,  RATE_12M, RATE_12M, RATE_18M}, /* fallback_rate1 */
 };
 
 #define RTSDUR_BB       0
Signature · 1 line
2.1.0
#2 lore raw

Re: [Outreachy kernel] [PATCH v2 1/2] Staging: vt6655: rxtx: Remove unnecessary space character

Quoted 17 lines · Shivani Bhardwaj

Remove unnecessary space character after the variable RATE_16M. Fixes the warning by checkpatch : space prohibited before that ',' (ctx:WxW)

---
Changes in v2:
-Make the commit message better and clearer.

 drivers/staging/vt6655/rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/vt6655/rxtx.c +0 -0
index 5875d65..a909128 100644

drivers/staging/vt6655/rxtx.c static const unsigned short wFB_Opt0[2][5] = { · line 81

Quoted 5 lines
drivers/staging/vt6655/rxtx.c +1 -1
@@ -78,7 +78,7 @@ static const unsigned short wFB_Opt0[2][5] = {
 };
 static const unsigned short wFB_Opt1[2][5] = {
 	{RATE_12M, RATE_18M, RATE_24M, RATE_24M, RATE_36M}, /* fallback_rate0 */
-	{RATE_6M , RATE_6M,  RATE_12M, RATE_12M, RATE_18M}, /* fallback_rate1 */
+	{RATE_6M, RATE_6M,  RATE_12M, RATE_12M, RATE_18M}, /* fallback_rate1 */

It looks lik ethere was a goal to get the constants and comment to line up, which doesn't seem to occur any more. Maybe you could move the comma without breaking the alignment.

julia

Quoted 13 lines
drivers/staging/vt6655/rxtx.c +0 -0
 };
 
 #define RTSDUR_BB       0
Signature · 8 lines
2.1.0

-- 
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/0e904876eb0c4ce2c937f9b1c54afb1039ac83c6.1444469447.git.shivanib134%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
#3 lore raw

Re: [Outreachy kernel] [PATCH v2 1/2] Staging: vt6655: rxtx: Remove unnecessary space character

Quoted 29 lines · Julia Lawall
Quoted 17 lines · Shivani Bhardwaj

Remove unnecessary space character after the variable RATE_16M. Fixes the warning by checkpatch : space prohibited before that ',' (ctx:WxW)

---
Changes in v2:
-Make the commit message better and clearer.

 drivers/staging/vt6655/rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/vt6655/rxtx.c +0 -0
index 5875d65..a909128 100644

drivers/staging/vt6655/rxtx.c static const unsigned short wFB_Opt0[2][5] = { · line 81

Quoted 5 lines
drivers/staging/vt6655/rxtx.c +1 -1
@@ -78,7 +78,7 @@ static const unsigned short wFB_Opt0[2][5] = {
 };
 static const unsigned short wFB_Opt1[2][5] = {
      {RATE_12M, RATE_18M, RATE_24M, RATE_24M, RATE_36M}, /* fallback_rate0 */
-     {RATE_6M , RATE_6M,  RATE_12M, RATE_12M, RATE_18M}, /* fallback_rate1 */
+     {RATE_6M, RATE_6M,  RATE_12M, RATE_12M, RATE_18M}, /* fallback_rate1 */

It looks lik ethere was a goal to get the constants and comment to line up, which doesn't seem to occur any more. Maybe you could move the comma without breaking the alignment.

Quoted 2 lines

julia

How has the alignment been disturbed here, I do not understand. Can you please tell, Julia?

Quoted 13 lines
Quoted 13 lines
drivers/staging/vt6655/rxtx.c +0 -1
 };
 
 #define RTSDUR_BB       0
--

2.1.0

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/0e904876eb0c4ce2c937f9b1c54afb1039ac83c6.1444469447.git.shivanib134%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

#4 lore raw

Re: [Outreachy kernel] [PATCH v2 1/2] Staging: vt6655: rxtx: Remove unnecessary space character

Quoted 30 lines · Shivani Bhardwaj
Quoted 29 lines · Julia Lawall
Quoted 17 lines · Shivani Bhardwaj

Remove unnecessary space character after the variable RATE_16M. Fixes the warning by checkpatch : space prohibited before that ',' (ctx:WxW)

---
Changes in v2:
-Make the commit message better and clearer.

 drivers/staging/vt6655/rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/vt6655/rxtx.c +0 -0
index 5875d65..a909128 100644

drivers/staging/vt6655/rxtx.c static const unsigned short wFB_Opt0[2][5] = { · line 81

Quoted 5 lines
drivers/staging/vt6655/rxtx.c +1 -1
@@ -78,7 +78,7 @@ static const unsigned short wFB_Opt0[2][5] = {
 };
 static const unsigned short wFB_Opt1[2][5] = {
      {RATE_12M, RATE_18M, RATE_24M, RATE_24M, RATE_36M}, /* fallback_rate0 */
-     {RATE_6M , RATE_6M,  RATE_12M, RATE_12M, RATE_18M}, /* fallback_rate1 */
+     {RATE_6M, RATE_6M,  RATE_12M, RATE_12M, RATE_18M}, /* fallback_rate1 */

It looks lik ethere was a goal to get the constants and comment to line up, which doesn't seem to occur any more. Maybe you could move the comma without breaking the alignment.

Quoted 5 lines
Quoted 2 lines

julia

How has the alignment been disturbed here, I do not understand. Can you please tell, Julia?

In the old code, the R of the second RATE_6M was aligned with the R of the RATE_18M just above. Now the R of the second RATE_6M is one character to the left. Before at the place you corrected, there was " , ", and you changed it to ", ". But to preserve the alignment, you could change it to ", ". Then all the RATEs will line up and the comment will line up.

You could also consider that this alignment is not important. But then there should be ", " in every case, not sometimes ", ".

julia

Quoted 22 lines
Quoted 14 lines
Quoted 14 lines
drivers/staging/vt6655/rxtx.c +0 -1
 };
 
 #define RTSDUR_BB       0
--

2.1.0

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/0e904876eb0c4ce2c937f9b1c54afb1039ac83c6.1444469447.git.shivanib134%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Signature · 5 lines
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/CAKHNQQGXQNjUy4Jgjftjb4dYotgE44vTdHbpHTjocUuro%3DtwOg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
#5 lore raw

Re: [Outreachy kernel] [PATCH v2 1/2] Staging: vt6655: rxtx: Remove unnecessary space character

Quoted 46 lines · Julia Lawall
Quoted 30 lines · Shivani Bhardwaj
Quoted 29 lines · Julia Lawall
Quoted 17 lines · Shivani Bhardwaj

Remove unnecessary space character after the variable RATE_16M. Fixes the warning by checkpatch : space prohibited before that ',' (ctx:WxW)

---
Changes in v2:
-Make the commit message better and clearer.

 drivers/staging/vt6655/rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/vt6655/rxtx.c +0 -0
index 5875d65..a909128 100644

drivers/staging/vt6655/rxtx.c static const unsigned short wFB_Opt0[2][5] = { · line 81

Quoted 5 lines
drivers/staging/vt6655/rxtx.c +1 -1
@@ -78,7 +78,7 @@ static const unsigned short wFB_Opt0[2][5] = {
 };
 static const unsigned short wFB_Opt1[2][5] = {
      {RATE_12M, RATE_18M, RATE_24M, RATE_24M, RATE_36M}, /* fallback_rate0 */
-     {RATE_6M , RATE_6M,  RATE_12M, RATE_12M, RATE_18M}, /* fallback_rate1 */
+     {RATE_6M, RATE_6M,  RATE_12M, RATE_12M, RATE_18M}, /* fallback_rate1 */

It looks lik ethere was a goal to get the constants and comment to line up, which doesn't seem to occur any more. Maybe you could move the comma without breaking the alignment.

Quoted 5 lines
Quoted 2 lines

julia

How has the alignment been disturbed here, I do not understand. Can you please tell, Julia?

In the old code, the R of the second RATE_6M was aligned with the R of the RATE_18M just above. Now the R of the second RATE_6M is one character to the left. Before at the place you corrected, there was " , ", and you changed it to ", ". But to preserve the alignment, you could change it to ", ". Then all the RATEs will line up and the comment will line up.

Quoted 5 lines

You could also consider that this alignment is not important. But then there should be ", " in every case, not sometimes ", ".

julia

Thank you, Julia! I'm fixing this.

Quoted 22 lines
Quoted 22 lines
Quoted 7 lines
Quoted 7 lines
drivers/staging/vt6655/rxtx.c +0 -1
 };
 
 #define RTSDUR_BB       0
--

2.1.0

Quoted 7 lines
Quoted 7 lines

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/0e904876eb0c4ce2c937f9b1c54afb1039ac83c6.1444469447.git.shivanib134%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/CAKHNQQGXQNjUy4Jgjftjb4dYotgE44vTdHbpHTjocUuro%3DtwOg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

#6 lore raw

PATCH v2 2/2 Staging: vt6655: rxtx: Remove unnecessary parentheses

In reply to Shivani Bhardwaj

Remove extra parentheses around if test expressions. Fixes checkpatch warning : unnecessary parentheses

---
Changes in v2:
-Make the commit message better and clearer.

 drivers/staging/vt6655/rxtx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/vt6655/rxtx.c +2 -2
index a909128..3eb8f29 100644
@@ -566,7 +566,7 @@ s_uFillDataHead(
 			return buf->duration_a;
 		} /* if (byFBOption == AUTO_FB_NONE) */
 	} else if (byPktType == PK_TYPE_11A) {
-		if ((byFBOption != AUTO_FB_NONE)) {
+		if (byFBOption != AUTO_FB_NONE) {
 			/* Auto Fallback */
 			struct vnt_tx_datahead_a_fb *buf = pTxDataHead;
 			/* Get SignalField, ServiceField & Length */
@@ -1008,7 +1008,7 @@ s_vGenerateTxParameter(
 			buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11A, cbFrameSize, wCurrentRate, bNeedACK);
 		}
 	} else if (byPktType == PK_TYPE_11B) {
-		if ((pvRTS != NULL)) {/* RTS_need, non PCF mode */
+		if (pvRTS != NULL) {/* RTS_need, non PCF mode */
 			struct vnt_rrv_time_ab *buf = pvRrvTime;
 
 			buf->rts_rrv_time = s_uGetRTSCTSRsvTime(pDevice, 0, byPktType, cbFrameSize, wCurrentRate);
Signature · 1 line
2.1.0