public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/8] staging: ft1000: ft1000-pcmcia: removed unnecessary braces
@ 2015-02-06 10:44 Pushpendra Singh
  2015-02-06 10:44 ` [PATCH 2/8] staging: ft1000: ft1000-pcmcia: remove unnecessary parentheses Pushpendra Singh
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Pushpendra Singh @ 2015-02-06 10:44 UTC (permalink / raw)
  To: linux-kernel, devel, marek.belisko, gregkh; +Cc: Pushpendra Singh

Removed checkpatch.pl warnings
WARNING: braces {} are not necessary for single statement blocks
+                       if (tempword == 0xfefe) {
+                               break;
+                       }

Signed-off-by: Pushpendra Singh <pushpendra.singh@smartplayin.com>
---
 drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 71 +++++++++---------------
 1 file changed, 25 insertions(+), 46 deletions(-)

diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
index 1ef367d..29a3d7e 100644
--- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
@@ -204,11 +204,10 @@ static inline void ft1000_write_dpram_mag_16(struct net_device *dev,
 	/* Provide mutual exclusive access while reading ASIC registers. */
 	spin_lock_irqsave(&info->dpram_lock, flags);
 	ft1000_write_reg(dev, FT1000_REG_DPRAM_ADDR, offset);
-	if (Index) {
+	if (Index)
 		ft1000_write_reg(dev, FT1000_REG_MAG_DPDATAL, value);
-	} else {
+	else
 		ft1000_write_reg(dev, FT1000_REG_MAG_DPDATAH, value);
-	}
 	spin_unlock_irqrestore(&info->dpram_lock, flags);
 }
 
@@ -440,9 +439,8 @@ static int ft1000_reset_card(struct net_device *dev)
 			tempword =
 				ft1000_read_dpram_mag_16(dev, FT1000_MAG_DPRAM_FEFE,
 							 FT1000_MAG_DPRAM_FEFE_INDX);
-			if (tempword == 0xfefe) {
+			if (tempword == 0xfefe)
 				break;
-			}
 			mdelay(20);
 		}
 
@@ -621,9 +619,8 @@ static void ft1000_hbchk(u_long data)
 
 		tempword = ft1000_read_reg(dev, FT1000_REG_DOORBELL);
 		/* Let's check doorbell again if fail */
-		if (tempword & FT1000_DB_HB) {
+		if (tempword & FT1000_DB_HB)
 			tempword = ft1000_read_reg(dev, FT1000_REG_DOORBELL);
-		}
 		if (tempword & FT1000_DB_HB) {
 			pr_info("heartbeat doorbell not clear by firmware\n");
 			if (info->AsicID == ELECTRABUZZ_ID) {
@@ -766,9 +763,8 @@ static void ft1000_send_cmd(struct net_device *dev, u16 *ptempbuffer, int size,
 
 	size += sizeof(struct pseudo_hdr);
 	/* check for odd byte and increment to 16-bit word align value */
-	if ((size & 0x0001)) {
+	if ((size & 0x0001))
 		size++;
-	}
 	pr_debug("total length = %d\n", size);
 	pr_debug("length = %d\n", ntohs(*ptempbuffer));
 	/*
@@ -911,9 +907,8 @@ static bool ft1000_receive_cmd(struct net_device *dev, u16 *pbuffer,
 		 * Calculate pseudo header checksum
 		 */
 		tempword = *ppseudohdr++;
-		for (i = 1; i < 7; i++) {
+		for (i = 1; i < 7; i++)
 			tempword ^= *ppseudohdr++;
-		}
 		if ((tempword != *ppseudohdr)) {
 			pr_debug("Pseudo header checksum mismatch\n");
 			/* Drop this message */
@@ -977,9 +972,8 @@ static void ft1000_proc_drvmsg(struct net_device *dev)
 				while (tempword & FT1000_DB_DPRAM_TX) {
 					mdelay(5);
 					i++;
-					if (i == 10) {
+					if (i == 10)
 						break;
-					}
 				}
 				ptr =
 					list_entry(info->prov_list.next,
@@ -1099,9 +1093,8 @@ static void ft1000_proc_drvmsg(struct net_device *dev)
 				mdelay(10);
 				tempword =
 					ft1000_read_reg(dev, FT1000_REG_DOORBELL);
-				if (tempword & FT1000_DB_DPRAM_TX) {
+				if (tempword & FT1000_DB_DPRAM_TX)
 					mdelay(10);
-				}
 			}
 
 			if ((tempword & FT1000_DB_DPRAM_TX) == 0) {
@@ -1128,9 +1121,8 @@ static void ft1000_proc_drvmsg(struct net_device *dev)
 				ppseudo_hdr->portsrc = 0;
 				/* Calculate new checksum */
 				ppseudo_hdr->checksum = *pmsg++;
-				for (i = 1; i < 7; i++) {
+				for (i = 1; i < 7; i++)
 					ppseudo_hdr->checksum ^= *pmsg++;
-				}
 				info->DSPInfoBlk[8] = 0x7200;
 				info->DSPInfoBlk[9] =
 					htons(info->DSPInfoBlklen);
@@ -1150,9 +1142,8 @@ static void ft1000_proc_drvmsg(struct net_device *dev)
 				mdelay(10);
 				tempword =
 					ft1000_read_reg(dev, FT1000_REG_DOORBELL);
-				if (tempword & FT1000_DB_DPRAM_TX) {
+				if (tempword & FT1000_DB_DPRAM_TX)
 					mdelay(10);
-				}
 			}
 
 			if ((tempword & FT1000_DB_DPRAM_TX) == 0) {
@@ -1178,9 +1169,8 @@ static void ft1000_proc_drvmsg(struct net_device *dev)
 				ppseudo_hdr->portsrc = 0;
 				/* Calculate new checksum */
 				ppseudo_hdr->checksum = *pmsg++;
-				for (i = 1; i < 7; i++) {
+				for (i = 1; i < 7; i++)
 					ppseudo_hdr->checksum ^= *pmsg++;
-				}
 				pmsg = (u16 *)&tempbuffer[16];
 				*pmsg++ = htons(RSP_DRV_ERR_RPT_MSG);
 				*pmsg++ = htons(0x000e);
@@ -1502,9 +1492,8 @@ static void ft1000_flush_fifo(struct net_device *dev, u16 DrvErrNum)
 			tempword = inw(dev->base_addr + FT1000_REG_MAG_DFSR);
 			pr_debug("FT1000_REG_MAG_DFSR = 0x%x\n", tempword);
 		}
-		if (DrvErrNum) {
+		if (DrvErrNum)
 			pcmcia->PktIntfErr++;
-		}
 	}
 }
 
@@ -1561,9 +1550,8 @@ static int ft1000_copy_up_pkt(struct net_device *dev)
 	if (skb == NULL) {
 		pr_debug("No Network buffers available\n");
 		/* Read High word to complete 32 bit access */
-		if (info->AsicID == MAGNEMITE_ID) {
+		if (info->AsicID == MAGNEMITE_ID)
 			tempword = ft1000_read_reg(dev, FT1000_REG_MAG_DFRH);
-		}
 		ft1000_flush_fifo(dev, 0);
 		info->stats.rx_errors++;
 		return FAILURE;
@@ -1667,9 +1655,8 @@ static int ft1000_copy_up_pkt(struct net_device *dev)
 	}
 
 	pr_debug("Data passed to Protocol layer:\n");
-	for (i = 0; i < len + 12; i++) {
+	for (i = 0; i < len + 12; i++)
 		pr_debug("Protocol Data: 0x%x\n", *ptemp++);
-	}
 
 	skb->dev = dev;
 	skb->protocol = eth_type_trans(skb, dev);
@@ -1723,21 +1710,16 @@ static int ft1000_copy_down_pkt(struct net_device *dev, u16 *packet, u16 len)
 	/* Check if there is room on the FIFO */
 	if (len > ft1000_read_fifo_len(dev)) {
 		udelay(10);
-		if (len > ft1000_read_fifo_len(dev)) {
+		if (len > ft1000_read_fifo_len(dev))
 			udelay(20);
-		}
-		if (len > ft1000_read_fifo_len(dev)) {
+		if (len > ft1000_read_fifo_len(dev))
 			udelay(20);
-		}
-		if (len > ft1000_read_fifo_len(dev)) {
+		if (len > ft1000_read_fifo_len(dev))
 			udelay(20);
-		}
-		if (len > ft1000_read_fifo_len(dev)) {
+		if (len > ft1000_read_fifo_len(dev))
 			udelay(20);
-		}
-		if (len > ft1000_read_fifo_len(dev)) {
+		if (len > ft1000_read_fifo_len(dev))
 			udelay(20);
-		}
 		if (len > ft1000_read_fifo_len(dev)) {
 			pr_debug("Transmit FIFO is full - pkt drop\n");
 			info->stats.tx_errors++;
@@ -1745,11 +1727,10 @@ static int ft1000_copy_down_pkt(struct net_device *dev, u16 *packet, u16 len)
 		}
 	}
 	/* Create pseudo header and send pseudo/ip to hardware */
-	if (info->AsicID == ELECTRABUZZ_ID) {
+	if (info->AsicID == ELECTRABUZZ_ID)
 		pseudo.blk.length = len;
-	} else {
+	else
 		pseudo.blk.length = ntohs(len);
-	}
 	pseudo.blk.source = DSPID;	/* Need to swap to get in correct order */
 	pseudo.blk.destination = HOSTID;
 	pseudo.blk.portdest = NETWORKID;	/* Need to swap to get in correct order */
@@ -1762,9 +1743,8 @@ static int ft1000_copy_down_pkt(struct net_device *dev, u16 *packet, u16 len)
 	pseudo.blk.qos_class = 0;
 	/* Calculate pseudo header checksum */
 	pseudo.blk.checksum = pseudo.buff[0];
-	for (i = 1; i < 7; i++) {
+	for (i = 1; i < 7; i++)
 		pseudo.blk.checksum ^= pseudo.buff[i];
-	}
 
 	/* Production Mode */
 	if (info->AsicID == ELECTRABUZZ_ID) {
@@ -1829,9 +1809,8 @@ static int ft1000_copy_down_pkt(struct net_device *dev, u16 *packet, u16 len)
 
 		plong = (u32 *)packet;
 		/* Write PPP type + IP Packet into Downlink FIFO */
-		for (i = 0; i < (len >> 2); i++) {
+		for (i = 0; i < (len >> 2); i++)
 			outl(*plong++, dev->base_addr + FT1000_REG_MAG_UFDR);
-		}
 
 		/* Check for odd alignment */
 		if (len & 0x0003) {
@@ -1963,9 +1942,9 @@ static irqreturn_t ft1000_interrupt(int irq, void *dev_id)
 						ft1000_read_reg(dev,
 								FT1000_REG_MAG_DFSR);
 				}
-				if (tempword & 0x1f) {
+				if (tempword & 0x1f)
 					ft1000_copy_up_pkt(dev);
-				} else {
+				else
 					break;
 				}
 				cnt++;
-- 
1.9.1


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

* [PATCH 2/8] staging: ft1000: ft1000-pcmcia: remove unnecessary parentheses
  2015-02-06 10:44 [PATCH 1/8] staging: ft1000: ft1000-pcmcia: removed unnecessary braces Pushpendra Singh
@ 2015-02-06 10:44 ` Pushpendra Singh
  2015-02-06 10:44 ` [PATCH 3/8] staging: ft1000: ft1000-pcmcia: remove unnecessary out of memory warning Pushpendra Singh
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Pushpendra Singh @ 2015-02-06 10:44 UTC (permalink / raw)
  To: linux-kernel, devel, marek.belisko, gregkh; +Cc: Pushpendra Singh

WARNING: Unnecessary parentheses
+               if ((tempword != *ppseudohdr)) {

Signed-off-by: Pushpendra Singh <pushpendra.singh@smartplayin.com>
---
 drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
index 29a3d7e..ae94214 100644
--- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
@@ -909,7 +909,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;
-- 
1.9.1


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

* [PATCH 3/8] staging: ft1000: ft1000-pcmcia: remove unnecessary out of memory warning
  2015-02-06 10:44 [PATCH 1/8] staging: ft1000: ft1000-pcmcia: removed unnecessary braces Pushpendra Singh
  2015-02-06 10:44 ` [PATCH 2/8] staging: ft1000: ft1000-pcmcia: remove unnecessary parentheses Pushpendra Singh
@ 2015-02-06 10:44 ` Pushpendra Singh
  2015-02-06 10:44 ` [PATCH 4/8] staging: ft1000: ft1000-pcmcia: add blank line after declarations Pushpendra Singh
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Pushpendra Singh @ 2015-02-06 10:44 UTC (permalink / raw)
  To: linux-kernel, devel, marek.belisko, gregkh; +Cc: Pushpendra Singh

WARNING: Possible unnecessary 'out of memory' message
+       if (skb == NULL) {
+               pr_debug("No Network buffers available\n");

Signed-off-by: Pushpendra Singh <pushpendra.singh@smartplayin.com>
---
 drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
index ae94214..9720061 100644
--- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
@@ -1548,7 +1548,6 @@ static int ft1000_copy_up_pkt(struct net_device *dev)
 	skb = dev_alloc_skb(len + 12 + 2);
 
 	if (skb == NULL) {
-		pr_debug("No Network buffers available\n");
 		/* Read High word to complete 32 bit access */
 		if (info->AsicID == MAGNEMITE_ID)
 			tempword = ft1000_read_reg(dev, FT1000_REG_MAG_DFRH);
-- 
1.9.1


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

* [PATCH 4/8] staging: ft1000: ft1000-pcmcia: add blank line after declarations
  2015-02-06 10:44 [PATCH 1/8] staging: ft1000: ft1000-pcmcia: removed unnecessary braces Pushpendra Singh
  2015-02-06 10:44 ` [PATCH 2/8] staging: ft1000: ft1000-pcmcia: remove unnecessary parentheses Pushpendra Singh
  2015-02-06 10:44 ` [PATCH 3/8] staging: ft1000: ft1000-pcmcia: remove unnecessary out of memory warning Pushpendra Singh
@ 2015-02-06 10:44 ` Pushpendra Singh
  2015-02-06 10:44 ` [PATCH 5/8] staging: ft1000: ft1000-usb: removed unnecessary braces Pushpendra Singh
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Pushpendra Singh @ 2015-02-06 10:44 UTC (permalink / raw)
  To: linux-kernel, devel, marek.belisko, gregkh; +Cc: Pushpendra Singh

Removed Checkpatch.pl warning
WARNING: Missing a blank line after declarations
+       struct ft1000_info *ft_info;
+       ft_info = netdev_priv(dev);

Signed-off-by: Pushpendra Singh <pushpendra.singh@smartplayin.com>
---
 drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
index 9720061..86ebe32 100644
--- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
@@ -2001,8 +2001,8 @@ static void ft1000_get_drvinfo(struct net_device *dev,
 			       struct ethtool_drvinfo *info)
 {
 	struct ft1000_info *ft_info;
-	ft_info = netdev_priv(dev);
 
+	ft_info = netdev_priv(dev);
 	strlcpy(info->driver, "ft1000", sizeof(info->driver));
 	snprintf(info->bus_info, sizeof(info->bus_info), "PCMCIA 0x%lx",
 		 dev->base_addr);
-- 
1.9.1


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

* [PATCH 5/8] staging: ft1000: ft1000-usb: removed unnecessary braces
  2015-02-06 10:44 [PATCH 1/8] staging: ft1000: ft1000-pcmcia: removed unnecessary braces Pushpendra Singh
                   ` (2 preceding siblings ...)
  2015-02-06 10:44 ` [PATCH 4/8] staging: ft1000: ft1000-pcmcia: add blank line after declarations Pushpendra Singh
@ 2015-02-06 10:44 ` Pushpendra Singh
  2015-02-06 10:44 ` [PATCH 6/8] staging: ft1000: ft1000-usb: remove unnecessary parentheses Pushpendra Singh
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Pushpendra Singh @ 2015-02-06 10:44 UTC (permalink / raw)
  To: linux-kernel, devel, marek.belisko, gregkh; +Cc: Pushpendra Singh

Removed Checkpatch.pl warning
WARNING: braces {} are not necessary for single statement blocks
+               if ((dev->app_info[i].fileobject == NULL)) {
+                       break;
+               }

Signed-off-by: Pushpendra Singh <pushpendra.singh@smartplayin.com>
---
 drivers/staging/ft1000/ft1000-usb/ft1000_debug.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
index 763ffa8..f2c9507 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
@@ -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");
@@ -629,9 +627,8 @@ static long ft1000_ioctl(struct file *file, unsigned int command,
 						pmsg = (u16 *)&dpram_data->pseudohdr;
 						ppseudo_hdr = (struct pseudo_hdr *)pmsg;
 						total_len = msgsz+2;
-						if (total_len & 0x1) {
+						if (total_len & 0x1)
 							total_len++;
-						}
 
 						/* Insert slow queue sequence number */
 						ppseudo_hdr->seq_num = info->squeseqnum++;
-- 
1.9.1


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

* [PATCH 6/8] staging: ft1000: ft1000-usb: remove unnecessary parentheses
  2015-02-06 10:44 [PATCH 1/8] staging: ft1000: ft1000-pcmcia: removed unnecessary braces Pushpendra Singh
                   ` (3 preceding siblings ...)
  2015-02-06 10:44 ` [PATCH 5/8] staging: ft1000: ft1000-usb: removed unnecessary braces Pushpendra Singh
@ 2015-02-06 10:44 ` Pushpendra Singh
  2015-02-06 10:45 ` [PATCH 7/8] staging: ft1000: ft1000-usb: remove conditional statement Pushpendra Singh
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Pushpendra Singh @ 2015-02-06 10:44 UTC (permalink / raw)
  To: linux-kernel, devel, marek.belisko, gregkh; +Cc: Pushpendra Singh

Remove checkpatch.pl warning
WARNING: Unnecessary parentheses - maybe == should be = ?
+               if ((dev->app_info[i].fileobject == NULL))

Signed-off-by: Pushpendra Singh <pushpendra.singh@smartplayin.com>
---
 drivers/staging/ft1000/ft1000-usb/ft1000_debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
index f2c9507..b8e19ca 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
@@ -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 == NULL)
 			break;
 	}
 
-- 
1.9.1


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

* [PATCH 7/8] staging: ft1000: ft1000-usb: remove conditional statement
  2015-02-06 10:44 [PATCH 1/8] staging: ft1000: ft1000-pcmcia: removed unnecessary braces Pushpendra Singh
                   ` (4 preceding siblings ...)
  2015-02-06 10:44 ` [PATCH 6/8] staging: ft1000: ft1000-usb: remove unnecessary parentheses Pushpendra Singh
@ 2015-02-06 10:45 ` Pushpendra Singh
  2015-02-06 10:45 ` [PATCH 8/8] staging: ft1000: ft1000-usb: remove unnecessary out of memory warning Pushpendra Singh
  2015-02-07  9:42 ` [PATCH 1/8] staging: ft1000: ft1000-pcmcia: removed unnecessary braces Greg KH
  7 siblings, 0 replies; 9+ messages in thread
From: Pushpendra Singh @ 2015-02-06 10:45 UTC (permalink / raw)
  To: linux-kernel, devel, marek.belisko, gregkh; +Cc: Pushpendra Singh

their is no statements for if condition, but else have so instead
of using else condition ,use a single condition statement if(!qtype)

Signed-off-by: Puhspendra Singh <pushpendra.singh@smartplayin.com>
---
 drivers/staging/ft1000/ft1000-usb/ft1000_debug.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
index b8e19ca..91c4e06 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
@@ -588,8 +588,7 @@ static long ft1000_ioctl(struct file *file, unsigned int command,
 				/* Check message qtype type which is the lower byte within qos_class */
 				qtype = ntohs(dpram_data->pseudohdr.qos_class) & 0xff;
 				/* pr_debug("qtype = %d\n", qtype); */
-				if (qtype) {
-				} else {
+				if (!qtype) {
 					/* Put message into Slow Queue */
 					/* Only put a message into the DPRAM if msg doorbell is available */
 					status = ft1000_read_register(ft1000dev, &tempword, FT1000_REG_DOORBELL);
-- 
1.9.1


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

* [PATCH 8/8] staging: ft1000: ft1000-usb: remove unnecessary out of memory warning
  2015-02-06 10:44 [PATCH 1/8] staging: ft1000: ft1000-pcmcia: removed unnecessary braces Pushpendra Singh
                   ` (5 preceding siblings ...)
  2015-02-06 10:45 ` [PATCH 7/8] staging: ft1000: ft1000-usb: remove conditional statement Pushpendra Singh
@ 2015-02-06 10:45 ` Pushpendra Singh
  2015-02-07  9:42 ` [PATCH 1/8] staging: ft1000: ft1000-pcmcia: removed unnecessary braces Greg KH
  7 siblings, 0 replies; 9+ messages in thread
From: Pushpendra Singh @ 2015-02-06 10:45 UTC (permalink / raw)
  To: linux-kernel, devel, marek.belisko, gregkh; +Cc: Pushpendra Singh

WARNING: Possible unnecessary 'out of memory' message
+       if (skb == NULL) {
+               pr_debug("No Network buffers available\n");

Signed-off-by: Pushpendra Singh <pushpendra.singh@smartplayin.com>
---
 drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
index 502e16a..c771194 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
@@ -843,7 +843,6 @@ static int ft1000_copy_up_pkt(struct urb *urb)
 	skb = dev_alloc_skb(len + 12 + 2);
 
 	if (skb == NULL) {
-		pr_debug("No Network buffers available\n");
 		info->stats.rx_errors++;
 		ft1000_submit_rx_urb(info);
 		return -1;
-- 
1.9.1


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

* Re: [PATCH 1/8] staging: ft1000: ft1000-pcmcia: removed unnecessary braces
  2015-02-06 10:44 [PATCH 1/8] staging: ft1000: ft1000-pcmcia: removed unnecessary braces Pushpendra Singh
                   ` (6 preceding siblings ...)
  2015-02-06 10:45 ` [PATCH 8/8] staging: ft1000: ft1000-usb: remove unnecessary out of memory warning Pushpendra Singh
@ 2015-02-07  9:42 ` Greg KH
  7 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2015-02-07  9:42 UTC (permalink / raw)
  To: Pushpendra Singh; +Cc: linux-kernel, devel, marek.belisko

On Fri, Feb 06, 2015 at 04:14:54PM +0530, Pushpendra Singh wrote:
> Removed checkpatch.pl warnings
> WARNING: braces {} are not necessary for single statement blocks
> +                       if (tempword == 0xfefe) {
> +                               break;
> +                       }
> 
> Signed-off-by: Pushpendra Singh <pushpendra.singh@smartplayin.com>
> ---
>  drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 71 +++++++++---------------
>  1 file changed, 25 insertions(+), 46 deletions(-)

This patch doesn't apply to my tree :(

Can you please refresh it and resend the series?

thanks,

greg k-h

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

end of thread, other threads:[~2015-02-07 17:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-06 10:44 [PATCH 1/8] staging: ft1000: ft1000-pcmcia: removed unnecessary braces Pushpendra Singh
2015-02-06 10:44 ` [PATCH 2/8] staging: ft1000: ft1000-pcmcia: remove unnecessary parentheses Pushpendra Singh
2015-02-06 10:44 ` [PATCH 3/8] staging: ft1000: ft1000-pcmcia: remove unnecessary out of memory warning Pushpendra Singh
2015-02-06 10:44 ` [PATCH 4/8] staging: ft1000: ft1000-pcmcia: add blank line after declarations Pushpendra Singh
2015-02-06 10:44 ` [PATCH 5/8] staging: ft1000: ft1000-usb: removed unnecessary braces Pushpendra Singh
2015-02-06 10:44 ` [PATCH 6/8] staging: ft1000: ft1000-usb: remove unnecessary parentheses Pushpendra Singh
2015-02-06 10:45 ` [PATCH 7/8] staging: ft1000: ft1000-usb: remove conditional statement Pushpendra Singh
2015-02-06 10:45 ` [PATCH 8/8] staging: ft1000: ft1000-usb: remove unnecessary out of memory warning Pushpendra Singh
2015-02-07  9:42 ` [PATCH 1/8] staging: ft1000: ft1000-pcmcia: removed unnecessary braces Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox