Staging: slicoss: Fix checkpatch.pl issues
The following files had coding style issues that I tried to address. It was mostly about lines spanning more than 80 characters.
drivers/staging/slicoss/slicoss.c +12 -9
@@ -98,7 +98,8 @@#include "slic.h" static uint slic_first_init =1 ; -static char *slic_banner ="Alacritech SLIC Technology(tm) Server and Storage Accelerator (Non-Accelerated)" ; +static char *slic_banner ="Alacritech SLIC Technology(tm) Server " +"and Storage Accelerator (Non-Accelerated)" ;static char *slic_proc_version ="2.0.351 2006/07/14 12:26:00" ;
@@ -755,10 +756,10 @@ static bool slic_mac_filter(struct adapter *adapter,while (mcaddr) {if (ether_addr_equal (mcaddr->address, - ether_frame->ether_dhost)) { - adapter->rcv_multicasts++; - netdev->stats.multicast++; -return true; + ether_frame->ether_dhost)) { + adapter->rcv_multicasts++; + netdev->stats.multicast++; +return true; } mcaddr = mcaddr->next; }
@@ -2561,8 +2562,9 @@ static int slic_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)DBG_IOCTL ("slic_ioctl SIOCSLIC_TRACE_DUMP\n" );if (copy_from_user (data, rq->ifr_data,28 )) { -PRINT_ERROR - ("slic: copy_from_user FAILED getting initial simba param\n" ); +PRINT_ERROR ( +"slic: copy_from_user FAILED getting initial simba param\n" + );return -EFAULT ; }
@@ -2576,8 +2578,9 @@ static int slic_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) }else if ((tracemon_request ==SLIC_DUMP_REQUESTED ) || (tracemon_request ==SLIC_DUMP_IN_PROGRESS )) { -PRINT_ERROR - ("ATK Diagnostic Trace Dump Requested but already in progress... ignore\n" ); +PRINT_ERROR ( +"ATK Diagnostic Trace Dump Requested but already in progress... ignore\n" + ); }else {PRINT_ERROR ("ATK Diagnostic Trace Dump Requested\n" );
Signature · 1 line
1.9.1
Quoted 2 lines · Niranjan Dighe
The following files had coding style issues that I tried to address. It was mostly about lines spanning more than 80 characters.
[]
drivers/staging/slicoss/slicoss.c
Quoted 1 line
drivers/staging/slicoss/slicoss.c +0
-0
[]
drivers/staging/slicoss/slicoss.c line 102
Quoted 7 lines
drivers/staging/slicoss/slicoss.c +2
-1@@ -98,7 +98,8 @@#include "slic.h" static uint slic_first_init =1 ; -static char *slic_banner ="Alacritech SLIC Technology(tm) Server and Storage Accelerator (Non-Accelerated)" ; +static char *slic_banner ="Alacritech SLIC Technology(tm) Server " +"and Storage Accelerator (Non-Accelerated)" ;
Please don't split strings.
Maybe remove this and update the format in the one place it's used instead.
drivers/staging/slicoss/slicoss.c static bool slic_mac_filter(struct adapter *adapter, · line 762
Quoted 12 lines
drivers/staging/slicoss/slicoss.c +4
-4@@ -755,10 +756,10 @@ static bool slic_mac_filter(struct adapter *adapter,while (mcaddr) {if (ether_addr_equal (mcaddr->address, - ether_frame->ether_dhost)) { - adapter->rcv_multicasts++; - netdev->stats.multicast++; -return true; + ether_frame->ether_dhost)) { + adapter->rcv_multicasts++; + netdev->stats.multicast++; +return true;
80 columns is a preferred limit not a hard one. The original is correct and your new indentation is not.
drivers/staging/slicoss/slicoss.c static int slic_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) · line 2567
Quoted 9 lines
drivers/staging/slicoss/slicoss.c +3
-2@@ -2561,8 +2562,9 @@ static int slic_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)DBG_IOCTL ("slic_ioctl SIOCSLIC_TRACE_DUMP\n" );if (copy_from_user (data, rq->ifr_data,28 )) { -PRINT_ERROR - ("slic: copy_from_user FAILED getting initial simba param\n" ); +PRINT_ERROR ( +"slic: copy_from_user FAILED getting initial simba param\n" + );
Just remove all the #ifdef SLIC_TRACE_DUMP_ENABLED blocks, PRINT_ERROR isn't defined anywhere. and this can't be compiled.
Quoted 10 lines · Niranjan Dighe
The following files had coding style issues that I tried to address. It was mostly about lines spanning more than 80 characters.
Signed-off-by Niranjan Dighe <[email protected]>drivers/staging/slicoss/slicoss.c +0
-0
drivers/staging/slicoss/slicoss.c line 102
Quoted 6 lines
drivers/staging/slicoss/slicoss.c +2
-1@@ -98,7 +98,8 @@#include "slic.h" static uint slic_first_init =1 ; -static char *slic_banner ="Alacritech SLIC Technology(tm) Server and Storage Accelerator (Non-Accelerated)" ; +static char *slic_banner ="Alacritech SLIC Technology(tm) Server " +"and Storage Accelerator (Non-Accelerated)" ;
Just leave it. The original is better for grepping.
Quoted 8 lines
drivers/staging/slicoss/slicoss.c +0
-1static char *slic_proc_version ="2.0.351 2006/07/14 12:26:00" ;@@ -755,10 +756,10 @@ static bool slic_mac_filter(struct adapter *adapter,while (mcaddr) { if (ether_addr_equal(mcaddr->address, - ether_frame->ether_dhost)) {
drivers/staging/slicoss/slicoss.c static bool slic_mac_filter(struct adapter *adapter, · line 765
Quoted 10 lines
drivers/staging/slicoss/slicoss.c +4
-3- adapter->rcv_multicasts++; - netdev->stats.multicast++; -return true; + ether_frame->ether_dhost)) { + adapter->rcv_multicasts++; + netdev->stats.multicast++; +return true; } mcaddr = mcaddr->next; }
Check patch likes the new code but the original is better for human beings. Sorry.
regards,
dan carpenter
Quoted 3 lines · Dan Carpenter
Quoted 2 lines · Niranjan Dighe
The following files had coding style issues that I tried to address. It was mostly about lines spanning more than 80 characters.
[]
Quoted 1 line
drivers/staging/slicoss/slicoss.c
Quoted 1 line
drivers/staging/slicoss/slicoss.c +0
-0
[]
Quoted 18 lines
Quoted 5 lines
drivers/staging/slicoss/slicoss.c +0
-1@@ -755,10 +756,10 @@ static bool slic_mac_filter(struct adapter *adapter,while (mcaddr) { if (ether_addr_equal(mcaddr->address, - ether_frame->ether_dhost)) {drivers/staging/slicoss/slicoss.c static bool slic_mac_filter(struct adapter *adapter, · line 765
Quoted 10 lines
drivers/staging/slicoss/slicoss.c +4
-3- adapter->rcv_multicasts++; - netdev->stats.multicast++; -return true; + ether_frame->ether_dhost)) { + adapter->rcv_multicasts++; + netdev->stats.multicast++; +return true; } mcaddr = mcaddr->next; }Check patch likes the new code but the original is better for human beings. Sorry.
The indentation isn't correct in the new code either.
That's actually a checkpatch defect because it's not able to track deletion/insertion alignment well enough.
Niranjan, checkpatch is a brainless little tool.
Always use yours whenever using checkpatch.