* [PATCH][V2] arcnet: capmode: remove redundant assignment to pointer pkt
@ 2019-08-28 23:14 Colin King
2019-08-30 21:15 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2019-08-28 23:14 UTC (permalink / raw)
To: Michael Grzeschik, David S . Miller, netdev; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Pointer pkt is being initialized with a value that is never read
and pkt is being re-assigned a little later on. The assignment is
redundant and hence can be removed.
Addresses-Coverity: ("Ununsed value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
V2: fix typo in patch description, pkg -> pkt
---
drivers/net/arcnet/capmode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/arcnet/capmode.c b/drivers/net/arcnet/capmode.c
index b780be6f41ff..c09b567845e1 100644
--- a/drivers/net/arcnet/capmode.c
+++ b/drivers/net/arcnet/capmode.c
@@ -44,7 +44,7 @@ static void rx(struct net_device *dev, int bufnum,
{
struct arcnet_local *lp = netdev_priv(dev);
struct sk_buff *skb;
- struct archdr *pkt = pkthdr;
+ struct archdr *pkt;
char *pktbuf, *pkthdrbuf;
int ofs;
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][V2] arcnet: capmode: remove redundant assignment to pointer pkt
2019-08-28 23:14 [PATCH][V2] arcnet: capmode: remove redundant assignment to pointer pkt Colin King
@ 2019-08-30 21:15 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-08-30 21:15 UTC (permalink / raw)
To: colin.king; +Cc: m.grzeschik, netdev, kernel-janitors, linux-kernel
From: Colin King <colin.king@canonical.com>
Date: Thu, 29 Aug 2019 00:14:50 +0100
> From: Colin Ian King <colin.king@canonical.com>
>
> Pointer pkt is being initialized with a value that is never read
> and pkt is being re-assigned a little later on. The assignment is
> redundant and hence can be removed.
>
> Addresses-Coverity: ("Ununsed value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>
> V2: fix typo in patch description, pkg -> pkt
Applied to net-next.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-08-30 21:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-28 23:14 [PATCH][V2] arcnet: capmode: remove redundant assignment to pointer pkt Colin King
2019-08-30 21:15 ` 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).