Skip to contentSkip to conversation

ft1000 driver checkpatch.pl fixes

PATCH In review Janakarajan Natarajan 3 participants 9 messages Mar 18, 2015 – Apr 1, 2015 2 messages not in the archive Staging

lore
Share & tools
lore
#0 lore raw

v2 cover ft1000 driver checkpatch.pl fixes

Minor changes to fix ft1000 driver checkpatch.pl warnings

Janakarajan Natarajan (5):
Drivers: Staging: ft1000: Single line if-statement changes
Drivers: Staging: ft1000: Fix extra parenthesis warnings
Drivers: Staging: ft1000: Refactoring if-else statement
Drivers: Staging: ft1000: Fix blank line after declartion warning
Drivers: Staging: ft1000: checkpatch.pl header file warning fix

v2: if-else refactored as suggested by Joe Perches <[email protected]
Variable reworked as suggested by Giedrius Statkevicius <[email protected]>

 drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 16 +++++++---------
 drivers/staging/ft1000/ft1000-usb/ft1000_debug.c |  6 ++----
 2 files changed, 9 insertions(+), 13 deletions(-)
Signature · 6 lines
1.9.1


---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com
#1 lore raw

PATCH v2 1/5 Drivers: Staging: ft1000: Single line if-statement changes

Minor change to remove {} for single line if statements

---
 drivers/staging/ft1000/ft1000-usb/ft1000_debug.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/staging/ft1000/ft1000-usb/ft1000_debug.c +2 -4
index c8d2782..8fb0f5a 100644
@@ -317,9 +317,8 @@ static int ft1000_open(struct inode *inode, struct file *file)
 
 	/* Search for available application info block */
 	for (i = 0; i < MAX_NUM_APP; i++) {
-		if ((dev->app_info[i].fileobject == NULL)) {
+		if ((dev->app_info[i].fileobject == NULL))
 			break;
-		}
 	}
 
 	/* Fail due to lack of application info block */
@@ -575,9 +574,8 @@ static long ft1000_ioctl(struct file *file, unsigned int command,
 			} else {
 				/* Check if this message came from a registered application */
 				for (i = 0; i < MAX_NUM_APP; i++) {
-					if (ft1000dev->app_info[i].fileobject == &file->f_owner) {
+					if (ft1000dev->app_info[i].fileobject == &file->f_owner)
 						break;
-					}
 				}
 				if (i == MAX_NUM_APP) {
 					pr_debug("No matching application fileobject\n");
Signature · 6 lines
1.9.1


---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com
#2 lore raw

PATCH v2 2/5 Drivers: Staging: ft1000: Fix extra parenthesis warnings

In reply to Janakarajan Natarajan

Minor changes to remove extra parenthesis

---
 drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 2 +-
 drivers/staging/ft1000/ft1000-usb/ft1000_debug.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c +1 -1
index 017c3b9..d4006a4 100644
@@ -911,7 +911,7 @@ static bool ft1000_receive_cmd(struct net_device *dev, u16 *pbuffer,
 		tempword = *ppseudohdr++;
 		for (i = 1; i < 7; i++)
 			tempword ^= *ppseudohdr++;
-		if ((tempword != *ppseudohdr)) {
+		if (tempword != *ppseudohdr) {
 			pr_debug("Pseudo header checksum mismatch\n");
 			/* Drop this message */
 			return false;
drivers/staging/ft1000/ft1000-usb/ft1000_debug.c +1 -1
index 8fb0f5a..8c1e5fc 100644
@@ -317,7 +317,7 @@ static int ft1000_open(struct inode *inode, struct file *file)
 
 	/* Search for available application info block */
 	for (i = 0; i < MAX_NUM_APP; i++) {
-		if ((dev->app_info[i].fileobject == NULL))
+		if (!dev->app_info[i].fileobject)
 			break;
 	}
 
Signature · 6 lines
1.9.1


---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com
#3 lore raw

PATCH v2 3/5 Drivers: Staging: ft1000: Refactoring if-else statement

In reply to Janakarajan Natarajan

Minor change to convert if-else to if statement

---
 drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c +3 -4
index d4006a4..973bfbf 100644
@@ -1948,11 +1948,10 @@ static irqreturn_t ft1000_interrupt(int irq, void *dev_id)
 						ft1000_read_reg(dev,
 								FT1000_REG_MAG_DFSR);
 				}
-				if (tempword & 0x1f) {
-					ft1000_copy_up_pkt(dev);
-				} else {
+				if (!(tempword & 0x1f))
 					break;
-				}
+
+				ft1000_copy_up_pkt(dev);
 				cnt++;
 			} while (cnt < MAX_RCV_LOOP);
 
Signature · 6 lines
1.9.1


---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com
#4 lore raw

PATCH v2 4/5 Drivers: Staging: ft1000: Fix blank line warning

In reply to Janakarajan Natarajan

Merges variable declaration and definition.

---
 drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c +1 -2
index 973bfbf..b43a6fd 100644
@@ -2006,8 +2006,7 @@ void stop_ft1000_card(struct net_device *dev)
 static void ft1000_get_drvinfo(struct net_device *dev,
 			       struct ethtool_drvinfo *info)
 {
-	struct ft1000_info *ft_info;
-	ft_info = netdev_priv(dev);
+	struct ft1000_info *ft_info = netdev_priv(dev);
 
 	strlcpy(info->driver, "ft1000", sizeof(info->driver));
 	snprintf(info->bus_info, sizeof(info->bus_info), "PCMCIA 0x%lx",
Signature · 6 lines
1.9.1


---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com
#5 lore raw

PATCH v2 5/5 Drivers: Staging: ft1000: checkpatch.pl header file warning fix

In reply to Janakarajan Natarajan

Replaces <asm/io.h> and <asm/bitops.h> with <linux/io.h> and <linux/bitops.h>

---
 drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c +2 -2
index b43a6fd..a93eaf5 100644
@@ -28,8 +28,8 @@
 #include <linux/timer.h>
 #include <linux/interrupt.h>
 #include <linux/in.h>
-#include <asm/io.h>
-#include <asm/bitops.h>
+#include <linux/io.h>
+#include <linux/bitops.h>
 
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
Signature · 6 lines
1.9.1


---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com
#6 lore raw
In reply to Janakarajan Natarajan
Quoted 9 lines · Janakarajan Natarajan

Minor changes to fix ft1000 driver checkpatch.pl warnings

Janakarajan Natarajan (5):
Drivers: Staging: ft1000: Single line if-statement changes
Drivers: Staging: ft1000: Fix extra parenthesis warnings
Drivers: Staging: ft1000: Refactoring if-else statement
Drivers: Staging: ft1000: Fix blank line after declartion warning
Drivers: Staging: ft1000: checkpatch.pl header file warning fix

Quoted 6 lines

v2: if-else refactored as suggested by Joe Perches <[email protected]
Variable reworked as suggested by Giedrius Statkevicius <[email protected]>

 drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 16 +++++++---------
 drivers/staging/ft1000/ft1000-usb/ft1000_debug.c |  6 ++----
 2 files changed, 9 insertions(+), 13 deletions(-)

Why did you resend this "v2" series with no changes?

I don't know what to do here, so I've dropped all of your pending patches for this driver, please resend anything I haven't applied.

Remember, you need to be _really_ explicit as to what to do, I deal with over a thousand emails a day, and handle patches in batches, and have no short-term memory as to what happened yesterday/last week in email threads.

thanks,

greg k-h

A message that is not in the archive (sent off-list or not yet received): CAJo0J4xzWVjEhTe1-N24PJOzSPbZQbksyWzHCk5X+nYxmWmS6Q@mail.gmail.com

#8 lore raw

A: No.
Q: Should I include quotations after my reply?

http://daringfireball.net/2007/07/on_top

Quoted 2 lines · Janakarajan Natarajan

I resent v2 because I didn't know if my previous patchset had been accepted or not.

Then it's really not a 'v2' patch series, is it :(

I suggest resending them in the proper format, if I haven't already applied them...

thanks,

greg k-h

A message that is not in the archive (sent off-list or not yet received): CAJo0J4w7EPyc7mmugkEoh5Tvar_e_zT1V9bb1oWU9kAhgQYTkQ@mail.gmail.com

#10 lore raw
Quoted 6 lines · Janakarajan Natarajan

I initially sent a single patch on March 11th. It was recommended that I send it in a patchset as it did too many things in 1 patch.
I submitted the v2 patchset on March 12th. After a week of not knowing if it was accepted, I resent it again on March 18.

I will resend the patchset. Should it be labled 'v2'?

People can be busy and for most patches that aren't critical fixes, you should wait a month or so before resending anything that hasn't been applied or commented on.

And instead of incrementing the version, just prefix with something like: "[resend PATCH v<N>]"