Skip to contentSkip to conversation

Staging: vt6655: Fix checkpatch.pl issues

PATCH Superseded Madhumitha Prabakaran 2 participants 8 messages Mar 5, 2019 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Staging: vt6655: Fix checkpatch.pl issues

These patches fix warning line over 80 characters, modify spelling error, fix warning about preprocessor conditionals and fix space around '-'.

Madhumitha Prabakaran (5):
Staging: vt6655: Fix line over 80 characters
Staging: vt6655: Fix line over 80 characters
Staging: vt6655: Fix warning about preprocessor conditionals
Staging: vt6655: Fix spelling mistake
Staging: vt6655: Fix space around binary operator

 drivers/staging/vt6655/card.h  | 6 ++++--
 drivers/staging/vt6655/power.c | 1 -
 drivers/staging/vt6655/rf.c    | 4 ++--
 3 files changed, 6 insertions(+), 5 deletions(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/5 Staging: vt6655: Fix line over 80 characters

Fix the warning issued by checkpatch.pl
WARNING: line over 80 characters

---
 drivers/staging/vt6655/card.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/vt6655/card.h +2 -1
index d71022aa3f86..6bbbbe1314d5 100644
@@ -44,7 +44,8 @@ struct vnt_private;
 void CARDvSetRSPINF(struct vnt_private *priv, u8 bb_type);
 void CARDvUpdateBasicTopRate(struct vnt_private *priv);
 bool CARDbIsOFDMinBasicRate(struct vnt_private *priv);
-void CARDvSetLoopbackMode(struct vnt_private *priv, unsigned short wLoopbackMode);
+void CARDvSetLoopbackMode(struct vnt_private *priv,
+			  unsigned short wLoopbackMode);
 bool CARDbSoftwareReset(struct vnt_private *priv);
 void CARDvSetFirstNextTBTT(struct vnt_private *priv,
 			   unsigned short wBeaconInterval);
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/5 Staging: vt6655: Fix line over 80 characters

In reply to Madhumitha Prabakaran

Fix the warning by checkpatch.pl
WARNING: line over 80 characters

---
 drivers/staging/vt6655/card.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/vt6655/card.h +2 -1
index 6bbbbe1314d5..490cecf8fb9d 100644
@@ -62,6 +62,7 @@ bool CARDbRadioPowerOn(struct vnt_private *priv);
 bool CARDbSetPhyParameter(struct vnt_private *priv, u8 bb_type);
 bool CARDbUpdateTSF(struct vnt_private *priv, unsigned char byRxRate,
 		    u64 qwBSSTimestamp);
-bool CARDbSetBeaconPeriod(struct vnt_private *priv, unsigned short wBeaconInterval);
+bool CARDbSetBeaconPeriod(struct vnt_private *priv,
+			  unsigned short wBeaconInterval);
 
 #endif /* __CARD_H__ */
Signature · 1 line
2.17.1
#3 lore raw

PATCH 3/5 Staging: vt6655: Fix warning about preprocessor conditionals

In reply to Madhumitha Prabakaran

Fix the warning by removing code between #if and #endif, as coding style say the compiler will constant-fold the conditional away and include or exclude the block of code as with an endif.

---
 drivers/staging/vt6655/power.c | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/vt6655/power.c +0 -1
index d6c581b31569..c2a7c120a94d 100644
@@ -64,7 +64,6 @@ PSvEnablePowerSaving(
 	} else {
 		/* set ATIM Window */
 #if 0 /* TODO atim window */
-		MACvWriteATIMW(priv->PortOffset, pMgmt->wCurrATIMWindow);
 #endif
 	}
 	/* Set AutoSleep */
Signature · 1 line
2.17.1
#5 lore raw

PATCH 4/5 Staging: vt6655: Fix spelling mistake

In reply to Madhumitha Prabakaran

Fix the check for spelling mistake
CHECK: 'Regsiter' may be misspelled - perhaps 'Register'

---
 drivers/staging/vt6655/rf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/vt6655/rf.c +1 -1
index 03b0d56dbe9e..825b6ab5c0de 100644
@@ -163,7 +163,7 @@ static const unsigned long dwAL7230InitTable[CB_AL7230_INIT_SEQ] = {
 	0x841FF200 + (BY_AL7230_REG_LEN << 3) + IFREGCTL_REGW, /* Need modify for 11a: 451FE2 */
 	0x3FDFA300 + (BY_AL7230_REG_LEN << 3) + IFREGCTL_REGW, /* Need modify for 11a: 5FDFA3 */
 	0x7FD78400 + (BY_AL7230_REG_LEN << 3) + IFREGCTL_REGW, /* 11b/g    // Need modify for 11a */
-	/* RoberYu:20050113, Rev0.47 Regsiter Setting Guide */
+	/* RoberYu:20050113, Rev0.47 Register Setting Guide */
 	0x802B5500 + (BY_AL7230_REG_LEN << 3) + IFREGCTL_REGW, /* Need modify for 11a: 8D1B55 */
 	0x56AF3600 + (BY_AL7230_REG_LEN << 3) + IFREGCTL_REGW,
 	0xCE020700 + (BY_AL7230_REG_LEN << 3) + IFREGCTL_REGW, /* Need modify for 11a: 860207 */
Signature · 1 line
2.17.1
#6 lore raw

PATCH 5/5 Staging: vt6655: Fix space around binary operator

In reply to Madhumitha Prabakaran

Fix the check as per Linux kernel style for use of spaces
CHECK: spaces preferred around that '-'

---
 drivers/staging/vt6655/rf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/vt6655/rf.c +1 -1
index 825b6ab5c0de..fd09b9771cf5 100644
@@ -792,7 +792,7 @@ bool RFbSetPower(
 			byDec = byPwr + 10;
 
 		if (byDec >= priv->byMaxPwrLevel)
-			byDec = priv->byMaxPwrLevel-1;
+			byDec = priv->byMaxPwrLevel - 1;
 
 		byPwr = byDec;
 		break;
Signature · 1 line
2.17.1
maintainer
#4 lore raw

Re: [Outreachy kernel] [PATCH 3/5] Staging: vt6655: Fix warning about preprocessor conditionals

In reply to Madhumitha Prabakaran
Quoted 14 lines · Madhumitha Prabakaran

Fix the warning by removing code between #if and #endif, as coding style say the compiler will constant-fold the conditional away and include or exclude the block of code as with an endif.

---
 drivers/staging/vt6655/power.c | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/vt6655/power.c +0 -0
index d6c581b31569..c2a7c120a94d 100644

drivers/staging/vt6655/power.c PSvEnablePowerSaving( · line 69

Quoted 7 lines
drivers/staging/vt6655/power.c +0 -1
@@ -64,7 +64,6 @@ PSvEnablePowerSaving(
 	} else {
 		/* set ATIM Window */
 #if 0 /* TODO atim window */
-		MACvWriteATIMW(priv->PortOffset, pMgmt->wCurrATIMWindow);
 #endif
 	}
 	/* Set AutoSleep */

When you removed this line, you then ended up with:

	#if 0
	#endif

which does not make much sense :)

As this is a "TODO" item, I would just leave this alone for now. Hopefully someone will fix this correctly in the future.

thanks,

greg k-h

maintainer
#7 lore raw
In reply to Madhumitha Prabakaran
Quoted 7 lines · Madhumitha Prabakaran

These patches fix warning line over 80 characters, modify spelling error, fix warning about preprocessor conditionals and fix space around '-'.

Madhumitha Prabakaran (5):
Staging: vt6655: Fix line over 80 characters
Staging: vt6655: Fix line over 80 characters

These two have the same subject line, yet do different things :(

Please fix up and resend the series (after dropping the one patch I complained about.)

thanks,

greg k-h