Fix checkpatch warnings
v2 cover Fix checkpatch warnings
This patch removes the warnings about character limit and unnecessary code. After applying this patch, the file shows less warnings when checked against checkpatch script.
Shivani Bhardwaj (2):
Staging: vt6655: mac: Remove character limit warning
Staging: vt6655: mac: Remove unnecessary braces
drivers/staging/vt6655/mac.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-)
Signature · 1 line
2.1.0
PATCH v2 1/2 Staging: vt6655: mac: Remove character limit warning
Break the lines with over 80 characters into sensible chunks of data. Fixes the chackpacth warning: line over 80 characters
--- drivers/staging/vt6655/mac.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
drivers/staging/vt6655/mac.c +9 -6
@@ -46,9 +46,9 @@* MACvTimer0MicroSDelay - Micro Second Delay Loop by MAC * * Revision History: -* 08-22-2003 Kyle Hsu : Porting MAC functions from sim53 -* 09-03-2003 Bryan YC Fan : Add MACvClearBusSusInd()& MACvEnableBusSusEn() -* 09-18-2003 Jerry Chen : Add MACvSetKeyEntry & MACvDisableKeyEntry +* 08-22-2003 Kyle Hsu : Porting MAC functions from sim53 +* 09-03-2003 Bryan YC Fan : Add MACvClearBusSusInd()& MACvEnableBusSusEn() +* 09-18-2003 Jerry Chen : Add MACvSetKeyEntry & MACvDisableKeyEntry * */
@@ -326,7 +326,8 @@ bool MACbSoftwareReset(void __iomem *dwIoBase)*/ bool MACbSafeSoftwareReset (void __iomem *dwIoBase) { -unsigned char abyTmpRegData[MAC_MAX_CONTEXT_SIZE_PAGE0 +MAC_MAX_CONTEXT_SIZE_PAGE1 ]; +unsigned char abyTmpRegData[MAC_MAX_CONTEXT_SIZE_PAGE0 + +MAC_MAX_CONTEXT_SIZE_PAGE1 ];bool bRetVal;/* PATCH....
@@ -565,7 +566,8 @@ void MACvInitialize(void __iomem *dwIoBase)* Return Value: none * */ -void MACvSetCurrRx0DescAddr (void __iomem *dwIoBase,unsigned long dwCurrDescAddr) +void MACvSetCurrRx0DescAddr (void __iomem *dwIoBase, +unsigned long dwCurrDescAddr) {unsigned short ww;unsigned char byData;
@@ -600,7 +602,8 @@ void MACvSetCurrRx0DescAddr(void __iomem *dwIoBase, unsigned long dwCurrDescAddr* Return Value: none * */ -void MACvSetCurrRx1DescAddr (void __iomem *dwIoBase,unsigned long dwCurrDescAddr) +void MACvSetCurrRx1DescAddr (void __iomem *dwIoBase, +unsigned long dwCurrDescAddr) {unsigned short ww;unsigned char byData;
Signature · 1 line
2.1.0
Re: [Outreachy kernel] [PATCH v2 1/2] Staging: vt6655: mac: Remove character limit warning
Quoted 4 lines · Shivani Bhardwaj
Break the lines with over 80 characters into sensible chunks of data. Fixes the chackpacth warning: line over 80 characters
Signed-off-by Shivani Bhardwaj <[email protected]>
With this patch you introduce new checkpatch.pl errors. Please run ./scripts/checkpatch.pl --strict 0001-your-patch.patch, before sending patch for review.
I'm looking at this type of error:
CHECK: Alignment should match open parenthesis #82: FILE: drivers/staging/vt6655/mac.c:606:
+void MACvSetCurrRx1DescAddr(void __iomem *dwIoBase,
+ unsigned long dwCurrDescAddr)
thanks,
Daniel.
Re: [Outreachy kernel] [PATCH v2 1/2] Staging: vt6655: mac: Remove character limit warning
Quoted 19 lines · Daniel Baluta
Quoted 4 lines · Shivani Bhardwaj
Break the lines with over 80 characters into sensible chunks of data. Fixes the chackpacth warning: line over 80 characters
Signed-off-by Shivani Bhardwaj <[email protected]>With this patch you introduce new checkpatch.pl errors. Please run
./scripts/checkpatch.pl--strict 0001-your-patch.patch, before sending patch for review.I'm looking at this type of error:
CHECK: Alignment should match open parenthesis
#82: FILE:drivers/staging/vt6655/mac.c:606:drivers/staging/vt6655/mac.c +2
-0+void MACvSetCurrRx1DescAddr (void __iomem *dwIoBase, +unsigned long dwCurrDescAddr)
Quoted 2 lines
thanks,
Daniel.
I'll take care next time. Thanks, Daniel.
PATCH v2 2/2 Staging: vt6655: mac: Remove unnecessary braces
In reply to Shivani BhardwajRemove unnecessary braces for an if statement as it comprises of a single line.
Fixes checkpatch warning: braces {} are not necessary for single statement blocks
--- drivers/staging/vt6655/mac.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/vt6655/mac.c +1 -2
@@ -692,9 +692,8 @@ void MACvSetCurrAC0DescAddrEx(void __iomem *dwIoBase,if (!(byData &DMACTL_RUN ))break ; } -if (ww ==W_MAX_TIMEOUT ) { +if (ww ==W_MAX_TIMEOUT )pr_debug (" DBG_PORT80(0x26)\n" ); - }VNSvOutPortD (dwIoBase +MAC_REG_AC0DMAPTR , dwCurrDescAddr);if (byOrgDMACtl &DMACTL_RUN )VNSvOutPortB (dwIoBase +MAC_REG_AC0DMACTL ,DMACTL_RUN );
Signature · 1 line
2.1.0