* [PATCH v2 1/7] staging: ft1000: ft1000-pcmcia: removed unnecessary braces
@ 2015-02-09 7:11 Pushpendra Singh
2015-02-09 7:11 ` [PATCH v2 2/7] staging: ft1000: ft1000-pcmcia: add blank line after declarations Pushpendra Singh
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Pushpendra Singh @ 2015-02-09 7:11 UTC (permalink / raw)
To: linux-kernel, devel, marek.belisko, gregkh; +Cc: Pushpendra Singh
Remove checkpatch.pl warning
WARNING: braces {} are not necessary for any arm of this statement
+ if (tempword & 0x1f) {
[...]
+ } else {
[...]
Signed-off-by: Pushpendra Singh <pushpendra.singh@smartplayin.com>
---
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
index e7072bc..374db6d 100644
--- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
@@ -1947,11 +1947,10 @@ 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++;
} while (cnt < MAX_RCV_LOOP);
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 2/7] staging: ft1000: ft1000-pcmcia: add blank line after declarations
2015-02-09 7:11 [PATCH v2 1/7] staging: ft1000: ft1000-pcmcia: removed unnecessary braces Pushpendra Singh
@ 2015-02-09 7:11 ` Pushpendra Singh
2015-02-09 7:12 ` [PATCH v2 3/7] staging: ft1000: ft1000-pcmcia: remove unnecessary parentheses Pushpendra Singh
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Pushpendra Singh @ 2015-02-09 7:11 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 374db6d..9d0fd6c 100644
--- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
@@ -2006,8 +2006,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] 8+ messages in thread
* [PATCH v2 3/7] staging: ft1000: ft1000-pcmcia: remove unnecessary parentheses
2015-02-09 7:11 [PATCH v2 1/7] staging: ft1000: ft1000-pcmcia: removed unnecessary braces Pushpendra Singh
2015-02-09 7:11 ` [PATCH v2 2/7] staging: ft1000: ft1000-pcmcia: add blank line after declarations Pushpendra Singh
@ 2015-02-09 7:12 ` Pushpendra Singh
2015-02-09 7:12 ` [PATCH v2 4/7] staging: ft1000: ft1000-usb: " Pushpendra Singh
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Pushpendra Singh @ 2015-02-09 7:12 UTC (permalink / raw)
To: linux-kernel, devel, marek.belisko, gregkh; +Cc: Pushpendra Singh
Remove checkpatch.pl warning
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 9d0fd6c..26659d0 100644
--- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
@@ -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;
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 4/7] staging: ft1000: ft1000-usb: remove unnecessary parentheses
2015-02-09 7:11 [PATCH v2 1/7] staging: ft1000: ft1000-pcmcia: removed unnecessary braces Pushpendra Singh
2015-02-09 7:11 ` [PATCH v2 2/7] staging: ft1000: ft1000-pcmcia: add blank line after declarations Pushpendra Singh
2015-02-09 7:12 ` [PATCH v2 3/7] staging: ft1000: ft1000-pcmcia: remove unnecessary parentheses Pushpendra Singh
@ 2015-02-09 7:12 ` Pushpendra Singh
2015-02-09 7:12 ` [PATCH v2 5/7] staging: ft1000: ft1000-usb: removed unnecessary braces Pushpendra Singh
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Pushpendra Singh @ 2015-02-09 7:12 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 c8d2782..25166db 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] 8+ messages in thread
* [PATCH v2 5/7] staging: ft1000: ft1000-usb: removed unnecessary braces
2015-02-09 7:11 [PATCH v2 1/7] staging: ft1000: ft1000-pcmcia: removed unnecessary braces Pushpendra Singh
` (2 preceding siblings ...)
2015-02-09 7:12 ` [PATCH v2 4/7] staging: ft1000: ft1000-usb: " Pushpendra Singh
@ 2015-02-09 7:12 ` Pushpendra Singh
2015-02-09 7:12 ` [PATCH v2 6/7] staging: ft1000: ft1000-usb: remove conditional statement Pushpendra Singh
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Pushpendra Singh @ 2015-02-09 7:12 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 25166db..bd0d25c 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] 8+ messages in thread
* [PATCH v2 6/7] staging: ft1000: ft1000-usb: remove conditional statement
2015-02-09 7:11 [PATCH v2 1/7] staging: ft1000: ft1000-pcmcia: removed unnecessary braces Pushpendra Singh
` (3 preceding siblings ...)
2015-02-09 7:12 ` [PATCH v2 5/7] staging: ft1000: ft1000-usb: removed unnecessary braces Pushpendra Singh
@ 2015-02-09 7:12 ` Pushpendra Singh
2015-02-09 7:12 ` [PATCH v2 7/7] staging: ft1000: ft1000-usb: remove unnecessary out of memory warning Pushpendra Singh
2015-03-07 0:30 ` [PATCH v2 1/7] staging: ft1000: ft1000-pcmcia: removed unnecessary braces Greg KH
6 siblings, 0 replies; 8+ messages in thread
From: Pushpendra Singh @ 2015-02-09 7:12 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 bd0d25c..a6dfe65 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] 8+ messages in thread
* [PATCH v2 7/7] staging: ft1000: ft1000-usb: remove unnecessary out of memory warning
2015-02-09 7:11 [PATCH v2 1/7] staging: ft1000: ft1000-pcmcia: removed unnecessary braces Pushpendra Singh
` (4 preceding siblings ...)
2015-02-09 7:12 ` [PATCH v2 6/7] staging: ft1000: ft1000-usb: remove conditional statement Pushpendra Singh
@ 2015-02-09 7:12 ` Pushpendra Singh
2015-03-07 0:30 ` [PATCH v2 1/7] staging: ft1000: ft1000-pcmcia: removed unnecessary braces Greg KH
6 siblings, 0 replies; 8+ messages in thread
From: Pushpendra Singh @ 2015-02-09 7:12 UTC (permalink / raw)
To: linux-kernel, devel, marek.belisko, gregkh; +Cc: Pushpendra Singh
Remove checkpatch.pl warning
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 f0ac438..690032b 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] 8+ messages in thread
* Re: [PATCH v2 1/7] staging: ft1000: ft1000-pcmcia: removed unnecessary braces
2015-02-09 7:11 [PATCH v2 1/7] staging: ft1000: ft1000-pcmcia: removed unnecessary braces Pushpendra Singh
` (5 preceding siblings ...)
2015-02-09 7:12 ` [PATCH v2 7/7] staging: ft1000: ft1000-usb: remove unnecessary out of memory warning Pushpendra Singh
@ 2015-03-07 0:30 ` Greg KH
6 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2015-03-07 0:30 UTC (permalink / raw)
To: Pushpendra Singh; +Cc: linux-kernel, devel, marek.belisko
On Mon, Feb 09, 2015 at 12:41:58PM +0530, Pushpendra Singh wrote:
> Remove checkpatch.pl warning
> WARNING: braces {} are not necessary for any arm of this statement
> + if (tempword & 0x1f) {
> [...]
> + } else {
> [...]
>
> Signed-off-by: Pushpendra Singh <pushpendra.singh@smartplayin.com>
> ---
> drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
This series doesn't apply to my tree, please refresh it and resend.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-03-07 11:00 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-09 7:11 [PATCH v2 1/7] staging: ft1000: ft1000-pcmcia: removed unnecessary braces Pushpendra Singh
2015-02-09 7:11 ` [PATCH v2 2/7] staging: ft1000: ft1000-pcmcia: add blank line after declarations Pushpendra Singh
2015-02-09 7:12 ` [PATCH v2 3/7] staging: ft1000: ft1000-pcmcia: remove unnecessary parentheses Pushpendra Singh
2015-02-09 7:12 ` [PATCH v2 4/7] staging: ft1000: ft1000-usb: " Pushpendra Singh
2015-02-09 7:12 ` [PATCH v2 5/7] staging: ft1000: ft1000-usb: removed unnecessary braces Pushpendra Singh
2015-02-09 7:12 ` [PATCH v2 6/7] staging: ft1000: ft1000-usb: remove conditional statement Pushpendra Singh
2015-02-09 7:12 ` [PATCH v2 7/7] staging: ft1000: ft1000-usb: remove unnecessary out of memory warning Pushpendra Singh
2015-03-07 0:30 ` [PATCH v2 1/7] staging: ft1000: ft1000-pcmcia: removed unnecessary braces 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.