* [PATCH] net: neterion: remove redundant assignment to variable tmp64
@ 2020-04-10 19:11 Colin King
2020-04-11 1:35 ` Jakub Kicinski
2020-04-12 18:47 ` Jakub Kicinski
0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2020-04-10 19:11 UTC (permalink / raw)
To: Jon Mason, David S . Miller, netdev; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The variable tmp64 is being initialized with a value that is never read
and it is being updated later with a new value. The initialization is
redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/ethernet/neterion/s2io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/neterion/s2io.c b/drivers/net/ethernet/neterion/s2io.c
index 0ec6b8e8b549..67e62603fe3b 100644
--- a/drivers/net/ethernet/neterion/s2io.c
+++ b/drivers/net/ethernet/neterion/s2io.c
@@ -5155,7 +5155,7 @@ static int do_s2io_delete_unicast_mc(struct s2io_nic *sp, u64 addr)
/* read mac entries from CAM */
static u64 do_s2io_read_unicast_mc(struct s2io_nic *sp, int offset)
{
- u64 tmp64 = 0xffffffffffff0000ULL, val64;
+ u64 tmp64, val64;
struct XENA_dev_config __iomem *bar0 = sp->bar0;
/* read mac addr */
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net: neterion: remove redundant assignment to variable tmp64
2020-04-10 19:11 [PATCH] net: neterion: remove redundant assignment to variable tmp64 Colin King
@ 2020-04-11 1:35 ` Jakub Kicinski
2020-04-12 18:47 ` Jakub Kicinski
1 sibling, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2020-04-11 1:35 UTC (permalink / raw)
To: Colin King
Cc: Jon Mason, David S . Miller, netdev, kernel-janitors, linux-kernel
On Fri, 10 Apr 2020 20:11:50 +0100 Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable tmp64 is being initialized with a value that is never read
> and it is being updated later with a new value. The initialization is
> redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
Patch looks good, but what's the value of this tag?
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: neterion: remove redundant assignment to variable tmp64
2020-04-10 19:11 [PATCH] net: neterion: remove redundant assignment to variable tmp64 Colin King
2020-04-11 1:35 ` Jakub Kicinski
@ 2020-04-12 18:47 ` Jakub Kicinski
1 sibling, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2020-04-12 18:47 UTC (permalink / raw)
To: Colin King
Cc: Jon Mason, David S . Miller, netdev, kernel-janitors, linux-kernel
On Fri, 10 Apr 2020 20:11:50 +0100 Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable tmp64 is being initialized with a value that is never read
> and it is being updated later with a new value. The initialization is
> redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-12 18:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-10 19:11 [PATCH] net: neterion: remove redundant assignment to variable tmp64 Colin King
2020-04-11 1:35 ` Jakub Kicinski
2020-04-12 18:47 ` Jakub Kicinski
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).