* [PATCH] netxen_nic: remove redundant check if retries is zero
@ 2017-03-15 15:31 Colin King
2017-03-15 22:06 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-03-15 15:31 UTC (permalink / raw)
To: Manish Chopra, Rahul Verma, Dept-GELinuxNICDev, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
At the end of the timeout loop, retries will always be zero so
the check for zero is redundant so remove it. Also replace
printk with pr_err as recommended by checkpatch.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c
index 7b43a3b..3dd9734 100644
--- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c
+++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c
@@ -1375,13 +1375,8 @@ netxen_receive_peg_ready(struct netxen_adapter *adapter)
} while (--retries);
- if (!retries) {
- printk(KERN_ERR "Receive Peg initialization not "
- "complete, state: 0x%x.\n", val);
- return -EIO;
- }
-
- return 0;
+ pr_err("Receive Peg initialization not complete, state: 0x%x.\n", val);
+ return -EIO;
}
int netxen_init_firmware(struct netxen_adapter *adapter)
--
2.10.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] netxen_nic: remove redundant check if retries is zero
2017-03-15 15:31 [PATCH] netxen_nic: remove redundant check if retries is zero Colin King
@ 2017-03-15 22:06 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-03-15 22:06 UTC (permalink / raw)
To: colin.king
Cc: manish.chopra, rahul.verma, Dept-GELinuxNICDev, netdev,
kernel-janitors, linux-kernel
From: Colin King <colin.king@canonical.com>
Date: Wed, 15 Mar 2017 15:31:58 +0000
> From: Colin Ian King <colin.king@canonical.com>
>
> At the end of the timeout loop, retries will always be zero so
> the check for zero is redundant so remove it. Also replace
> printk with pr_err as recommended by checkpatch.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-15 22:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-15 15:31 [PATCH] netxen_nic: remove redundant check if retries is zero Colin King
2017-03-15 22:06 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).