All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 7/9] staging: rtl8192u: Fixing style issues in r8180_93cx6.c
@ 2017-02-14 20:15 simran singhal
  2017-02-16 18:32 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: simran singhal @ 2017-02-14 20:15 UTC (permalink / raw)
  To: gregkh; +Cc: devel, linux-kernel

Fixing the following checkpatch.pl errors and warning:
WARNING: Block comments use * on subsequent lines

CHECK: Please don't use multiple blank lines

CHECK: Alignment should match open parenthesis

CHECK: spaces preferred around that '<<'

CHECK: spaces preferred around that '-'

CHECK: Alignment should match open parenthesis

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
---
 drivers/staging/rtl8192u/r8180_93cx6.c | 71 ++++++++++++++++------------------
 1 file changed, 33 insertions(+), 38 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8180_93cx6.c b/drivers/staging/rtl8192u/r8180_93cx6.c
index f35defc..6a293e3 100644
--- a/drivers/staging/rtl8192u/r8180_93cx6.c
+++ b/drivers/staging/rtl8192u/r8180_93cx6.c
@@ -1,22 +1,22 @@
 /*
-   This files contains card eeprom (93c46 or 93c56) programming routines,
-   memory is addressed by 16 bits words.
-
-   This is part of rtl8180 OpenSource driver.
-   Copyright (C) Andrea Merello 2004  <andrea.merello@gmail.com>
-   Released under the terms of GPL (General Public Licence)
-
-   Parts of this driver are based on the GPL part of the
-   official realtek driver.
-
-   Parts of this driver are based on the rtl8180 driver skeleton
-   from Patric Schenke & Andres Salomon.
-
-   Parts of this driver are based on the Intel Pro Wireless 2100 GPL driver.
-
-   We want to thank the Authors of those projects and the Ndiswrapper
-   project Authors.
-*/
+ *  This files contains card eeprom (93c46 or 93c56) programming routines,
+ *  memory is addressed by 16 bits words.
+ *
+ *  This is part of rtl8180 OpenSource driver.
+ *  Copyright (C) Andrea Merello 2004  <andrea.merello@gmail.com>
+ *  Released under the terms of GPL (General Public Licence)
+ *
+ *  Parts of this driver are based on the GPL part of the
+ *  official realtek driver.
+ *
+ *  Parts of this driver are based on the rtl8180 driver skeleton
+ *  from Patric Schenke & Andres Salomon.
+ *
+ *  Parts of this driver are based on the Intel Pro Wireless 2100 GPL driver.
+ *
+ *  We want to thank the Authors of those projects and the Ndiswrapper
+ *  project Authors.
+ */
 
 #include "r8180_93cx6.h"
 
@@ -39,7 +39,6 @@ static void eprom_cs(struct net_device *dev, short bit)
 	udelay(EPROM_DELAY);
 }
 
-
 static void eprom_ck_cycle(struct net_device *dev)
 {
 	u8 cmdreg;
@@ -58,7 +57,6 @@ static void eprom_ck_cycle(struct net_device *dev)
 	udelay(EPROM_DELAY);
 }
 
-
 static void eprom_w(struct net_device *dev, short bit)
 {
 	u8 cmdreg;
@@ -76,7 +74,6 @@ static void eprom_w(struct net_device *dev, short bit)
 	udelay(EPROM_DELAY);
 }
 
-
 static short eprom_r(struct net_device *dev)
 {
 	u8 bit;
@@ -94,7 +91,6 @@ static short eprom_r(struct net_device *dev)
 	return 0;
 }
 
-
 static void eprom_send_bits_string(struct net_device *dev, short b[], int len)
 {
 	int i;
@@ -105,7 +101,6 @@ static void eprom_send_bits_string(struct net_device *dev, short b[], int len)
 	}
 }
 
-
 int eprom_read(struct net_device *dev, u32 addr)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
@@ -119,27 +114,27 @@ int eprom_read(struct net_device *dev, u32 addr)
 	ret = 0;
 	/* enable EPROM programming */
 	write_nic_byte_E(dev, EPROM_CMD,
-		       (EPROM_CMD_PROGRAM<<EPROM_CMD_OPERATING_MODE_SHIFT));
+			 (EPROM_CMD_PROGRAM << EPROM_CMD_OPERATING_MODE_SHIFT));
 	force_pci_posting(dev);
 	udelay(EPROM_DELAY);
 
 	if (priv->epromtype == EPROM_93c56) {
 		addr_str[7] = addr & 1;
-		addr_str[6] = addr & (1<<1);
-		addr_str[5] = addr & (1<<2);
-		addr_str[4] = addr & (1<<3);
-		addr_str[3] = addr & (1<<4);
-		addr_str[2] = addr & (1<<5);
-		addr_str[1] = addr & (1<<6);
-		addr_str[0] = addr & (1<<7);
+		addr_str[6] = addr & (1 << 1);
+		addr_str[5] = addr & (1 << 2);
+		addr_str[4] = addr & (1 << 3);
+		addr_str[3] = addr & (1 << 4);
+		addr_str[2] = addr & (1 << 5);
+		addr_str[1] = addr & (1 << 6);
+		addr_str[0] = addr & (1 << 7);
 		addr_len = 8;
 	} else {
 		addr_str[5] = addr & 1;
-		addr_str[4] = addr & (1<<1);
-		addr_str[3] = addr & (1<<2);
-		addr_str[2] = addr & (1<<3);
-		addr_str[1] = addr & (1<<4);
-		addr_str[0] = addr & (1<<5);
+		addr_str[4] = addr & (1 << 1);
+		addr_str[3] = addr & (1 << 2);
+		addr_str[2] = addr & (1 << 3);
+		addr_str[1] = addr & (1 << 4);
+		addr_str[0] = addr & (1 << 5);
 		addr_len = 6;
 	}
 	eprom_cs(dev, 1);
@@ -162,7 +157,7 @@ int eprom_read(struct net_device *dev, u32 addr)
 		if (err < 0)
 			return err;
 
-		ret |= err<<(15-i);
+		ret |= err << (15 - i);
 	}
 
 	eprom_cs(dev, 0);
@@ -170,6 +165,6 @@ int eprom_read(struct net_device *dev, u32 addr)
 
 	/* disable EPROM programming */
 	write_nic_byte_E(dev, EPROM_CMD,
-		       (EPROM_CMD_NORMAL<<EPROM_CMD_OPERATING_MODE_SHIFT));
+			 (EPROM_CMD_NORMAL << EPROM_CMD_OPERATING_MODE_SHIFT));
 	return ret;
 }
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2 7/9] staging: rtl8192u: Fixing style issues in r8180_93cx6.c
  2017-02-14 20:15 [PATCH v2 7/9] staging: rtl8192u: Fixing style issues in r8180_93cx6.c simran singhal
@ 2017-02-16 18:32 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2017-02-16 18:32 UTC (permalink / raw)
  To: simran singhal; +Cc: devel, linux-kernel

On Wed, Feb 15, 2017 at 01:45:18AM +0530, simran singhal wrote:
> Fixing the following checkpatch.pl errors and warning:
> WARNING: Block comments use * on subsequent lines
> 
> CHECK: Please don't use multiple blank lines
> 
> CHECK: Alignment should match open parenthesis
> 
> CHECK: spaces preferred around that '<<'
> 
> CHECK: spaces preferred around that '-'
> 
> CHECK: Alignment should match open parenthesis
> 
> Signed-off-by: simran singhal <singhalsimran0@gmail.com>

That's a lot of different things all in one patch.  Please don't do
that, break up into individual patches.

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-02-16 18:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-14 20:15 [PATCH v2 7/9] staging: rtl8192u: Fixing style issues in r8180_93cx6.c simran singhal
2017-02-16 18:32 ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.