summaryrefslogtreecommitdiff
path: root/drivers/net/xen-netfront.c
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2020-10-31 19:04:35 +0100
committerJakub Kicinski <kuba@kernel.org>2020-11-02 16:03:12 -0800
commit8ed7ec1386b646130d80d017ecd4716f866ea570 (patch)
treecbabacb1c6991953ef82dbfeb192fbb1e33d017b /drivers/net/xen-netfront.c
parentce3f952104e0266986d8a4e6b11d8f979e18fb3e (diff)
drivers: net: xen-netfront: Fixed W=1 set but unused warnings
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>
Diffstat (limited to 'drivers/net/xen-netfront.c')
-rw-r--r--drivers/net/xen-netfront.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index 3e9895bec15f..920cac4385bf 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -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;