* [PATCH] net: dl2k: remove redundant re-assignment to np
@ 2017-11-01 8:57 Colin King
2017-11-02 6:53 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-11-01 8:57 UTC (permalink / raw)
To: David S . Miller, Tobias Klauser, Philippe Reynes, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The pointer np is initialized and then re-assigned the same value
a few lines later. Remove the redundant duplicated assignment. Cleans
up clang warning:
drivers/net/ethernet/dlink/dl2k.c:314:25: warning: Value stored to
'np' during its initialization is never read
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/ethernet/dlink/dl2k.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/dlink/dl2k.c b/drivers/net/ethernet/dlink/dl2k.c
index 778f974e2928..e07301e0b0ad 100644
--- a/drivers/net/ethernet/dlink/dl2k.c
+++ b/drivers/net/ethernet/dlink/dl2k.c
@@ -313,7 +313,7 @@ find_miiphy (struct net_device *dev)
{
struct netdev_private *np = netdev_priv(dev);
int i, phy_found = 0;
- np = netdev_priv(dev);
+
np->phy_addr = 1;
for (i = 31; i >= 0; i--) {
--
2.14.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: dl2k: remove redundant re-assignment to np
2017-11-01 8:57 [PATCH] net: dl2k: remove redundant re-assignment to np Colin King
@ 2017-11-02 6:53 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-11-02 6:53 UTC (permalink / raw)
To: colin.king; +Cc: tklauser, tremyfr, netdev, kernel-janitors, linux-kernel
From: Colin King <colin.king@canonical.com>
Date: Wed, 1 Nov 2017 08:57:37 +0000
> From: Colin Ian King <colin.king@canonical.com>
>
> The pointer np is initialized and then re-assigned the same value
> a few lines later. Remove the redundant duplicated assignment. Cleans
> up clang warning:
>
> drivers/net/ethernet/dlink/dl2k.c:314:25: warning: Value stored to
> 'np' during its initialization is never read
>
> 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-11-02 6:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-01 8:57 [PATCH] net: dl2k: remove redundant re-assignment to np Colin King
2017-11-02 6:53 ` 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).