drivers: net: xen-netfront: Fixed W=1 set but unused warnings
authorAndrew Lunn <andrew@lunn.ch>
Sat, 31 Oct 2020 18:04:35 +0000 (19:04 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 3 Nov 2020 00:03:12 +0000 (16:03 -0800)
drivers/net/xen-netfront.c:2416:16: warning: variable â€˜target’ set but not used [-Wunused-but-set-variable]
 2416 |  unsigned long target;

Remove target and just discard the return value from simple_strtoul().

This patch does give a checkpatch warning, but the warning was there
before anyway, as this file has lots of checkpatch warnings.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20201031180435.1081127-1-andrew@lunn.ch
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/xen-netfront.c

index 3e9895b..920cac4 100644 (file)
@@ -2413,12 +2413,11 @@ static ssize_t store_rxbuf(struct device *dev,
                           const char *buf, size_t len)
 {
        char *endp;
-       unsigned long target;
 
        if (!capable(CAP_NET_ADMIN))
                return -EPERM;
 
-       target = simple_strtoul(buf, &endp, 0);
+       simple_strtoul(buf, &endp, 0);
        if (endp == buf)
                return -EBADMSG;