* [PATCH] mkiss: remove redundant assignment of len to ax->mtu
@ 2017-10-29 13:30 Colin King
2017-11-01 3:10 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-10-29 13:30 UTC (permalink / raw)
To: David S . Miller, Thomas Osterried, Stephen Hemminger,
Johannes Berg, Ralf Baechle, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Variable len is being assigned a value that is never read,
hence the assignment is redundant and can be removed. Cleans
up clang warning:
drivers/net/hamradio/mkiss.c:443:3: warning: Value stored to
'len' is never read
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/hamradio/mkiss.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c
index 54bf8e6e4a09..c180b480f8ef 100644
--- a/drivers/net/hamradio/mkiss.c
+++ b/drivers/net/hamradio/mkiss.c
@@ -440,7 +440,6 @@ static void ax_encaps(struct net_device *dev, unsigned char *icp, int len)
ax_changedmtu(ax);
if (len > ax->mtu) { /* Sigh, shouldn't occur BUT ... */
- len = ax->mtu;
printk(KERN_ERR "mkiss: %s: truncating oversized transmit packet!\n", ax->dev->name);
dev->stats.tx_dropped++;
netif_start_queue(dev);
--
2.14.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mkiss: remove redundant assignment of len to ax->mtu
2017-10-29 13:30 [PATCH] mkiss: remove redundant assignment of len to ax->mtu Colin King
@ 2017-11-01 3:10 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-11-01 3:10 UTC (permalink / raw)
To: colin.king
Cc: thomas, stephen, johannes.berg, ralf, netdev, kernel-janitors,
linux-kernel
From: Colin King <colin.king@canonical.com>
Date: Sun, 29 Oct 2017 13:30:25 +0000
> From: Colin Ian King <colin.king@canonical.com>
>
> Variable len is being assigned a value that is never read,
> hence the assignment is redundant and can be removed. Cleans
> up clang warning:
>
> drivers/net/hamradio/mkiss.c:443:3: warning: Value stored to
> 'len' 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-01 3:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-29 13:30 [PATCH] mkiss: remove redundant assignment of len to ax->mtu Colin King
2017-11-01 3:10 ` 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).