[PATCH net-next] r8152: check code with checkpatch.pl

2014-08-25 Thread Hayes Wang
 626: CHECK: Alignment should match open parenthesis
 646: CHECK: Alignment should match open parenthesis
 655: CHECK: Alignment should match open parenthesis
 695: CHECK: Alignment should match open parenthesis
 729: CHECK: Alignment should match open parenthesis
 739: CHECK: Alignment should match open parenthesis
 976: WARNING: externs should be avoided in .c files
 1314: CHECK: Alignment should match open parenthesis
 1358: WARNING: networking block comments don't use an empty /* line, use /* 
Comment...
 1402: WARNING: networking block comments don't use an empty /* line, use /* 
Comment...
 1521: CHECK: multiple assignments should be avoided
 1775: CHECK: Alignment should match open parenthesis
 1838: CHECK: multiple assignments should be avoided
 1843: CHECK: multiple assignments should be avoided
 1847: CHECK: multiple assignments should be avoided
 1850: WARNING: Missing a blank line after declarations
 1864: CHECK: Alignment should match open parenthesis
 1872: CHECK: braces {} should be used on all arms of this statement
 1906: CHECK: usleep_range is preferred over udelay
 2865: WARNING: networking block comments don't use an empty /* line, use /* 
Comment...
 3088: CHECK: Alignment should match open parenthesis
 total: 0 errors, 5 warnings, 16 checks, 3567 lines checked

Signed-off-by: Hayes Wang hayesw...@realtek.com
---
 drivers/net/usb/r8152.c | 66 ++---
 1 file changed, 35 insertions(+), 31 deletions(-)

diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 87f7104..2470d9c 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -623,8 +623,8 @@ int get_registers(struct r8152 *tp, u16 value, u16 index, 
u16 size, void *data)
return -ENOMEM;
 
ret = usb_control_msg(tp-udev, usb_rcvctrlpipe(tp-udev, 0),
-  RTL8152_REQ_GET_REGS, RTL8152_REQT_READ,
-  value, index, tmp, size, 500);
+ RTL8152_REQ_GET_REGS, RTL8152_REQT_READ,
+ value, index, tmp, size, 500);
 
memcpy(data, tmp, size);
kfree(tmp);
@@ -643,8 +643,8 @@ int set_registers(struct r8152 *tp, u16 value, u16 index, 
u16 size, void *data)
return -ENOMEM;
 
ret = usb_control_msg(tp-udev, usb_sndctrlpipe(tp-udev, 0),
-  RTL8152_REQ_SET_REGS, RTL8152_REQT_WRITE,
-  value, index, tmp, size, 500);
+ RTL8152_REQ_SET_REGS, RTL8152_REQT_WRITE,
+ value, index, tmp, size, 500);
 
kfree(tmp);
 
@@ -652,7 +652,7 @@ int set_registers(struct r8152 *tp, u16 value, u16 index, 
u16 size, void *data)
 }
 
 static int generic_ocp_read(struct r8152 *tp, u16 index, u16 size,
-   void *data, u16 type)
+   void *data, u16 type)
 {
u16 limit = 64;
int ret = 0;
@@ -692,7 +692,7 @@ static int generic_ocp_read(struct r8152 *tp, u16 index, 
u16 size,
 }
 
 static int generic_ocp_write(struct r8152 *tp, u16 index, u16 byteen,
-   u16 size, void *data, u16 type)
+u16 size, void *data, u16 type)
 {
int ret;
u16 byteen_start, byteen_end, byen;
@@ -726,8 +726,8 @@ static int generic_ocp_write(struct r8152 *tp, u16 index, 
u16 byteen,
while (size) {
if (size  limit) {
ret = set_registers(tp, index,
-   type | BYTE_EN_DWORD,
-   limit, data);
+   type | BYTE_EN_DWORD,
+   limit, data);
if (ret  0)
goto error1;
 
@@ -736,8 +736,8 @@ static int generic_ocp_write(struct r8152 *tp, u16 index, 
u16 byteen,
size -= limit;
} else {
ret = set_registers(tp, index,
-   type | BYTE_EN_DWORD,
-   size, data);
+   type | BYTE_EN_DWORD,
+   size, data);
if (ret  0)
goto error1;
 
@@ -972,8 +972,8 @@ void write_mii_word(struct net_device *netdev, int phy_id, 
int reg, int val)
usb_autopm_put_interface(tp-intf);
 }
 
-static
-int r8152_submit_rx(struct r8152 *tp, struct rx_agg *agg, gfp_t mem_flags);
+static int
+r8152_submit_rx(struct r8152 *tp, struct rx_agg *agg, gfp_t mem_flags);
 
 static inline void set_ethernet_addr(struct r8152 *tp)
 {
@@ -1311,8 +1311,8 @@ static int alloc_all_mem(struct r8152 *tp)
 
tp-intr_interval = 

Re: [PATCH net-next] r8152: check code with checkpatch.pl

2014-08-25 Thread David Miller
From: Hayes Wang hayesw...@realtek.com
Date: Mon, 25 Aug 2014 15:53:00 +0800

  626: CHECK: Alignment should match open parenthesis
  646: CHECK: Alignment should match open parenthesis
  655: CHECK: Alignment should match open parenthesis
  695: CHECK: Alignment should match open parenthesis
  729: CHECK: Alignment should match open parenthesis
  739: CHECK: Alignment should match open parenthesis
  976: WARNING: externs should be avoided in .c files
  1314: CHECK: Alignment should match open parenthesis
  1358: WARNING: networking block comments don't use an empty /* line, use /* 
 Comment...
  1402: WARNING: networking block comments don't use an empty /* line, use /* 
 Comment...
  1521: CHECK: multiple assignments should be avoided
  1775: CHECK: Alignment should match open parenthesis
  1838: CHECK: multiple assignments should be avoided
  1843: CHECK: multiple assignments should be avoided
  1847: CHECK: multiple assignments should be avoided
  1850: WARNING: Missing a blank line after declarations
  1864: CHECK: Alignment should match open parenthesis
  1872: CHECK: braces {} should be used on all arms of this statement
  1906: CHECK: usleep_range is preferred over udelay
  2865: WARNING: networking block comments don't use an empty /* line, use /* 
 Comment...
  3088: CHECK: Alignment should match open parenthesis
  total: 0 errors, 5 warnings, 16 checks, 3567 lines checked
 
 Signed-off-by: Hayes Wang hayesw...@realtek.com

Applied, thanks.
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html