diff options
| author | Andrew Lunn <[email protected]> | 2020-10-31 18:04:35 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2020-11-03 00:03:12 +0000 |
| commit | 8ed7ec1386b646130d80d017ecd4716f866ea570 (patch) | |
| tree | cbabacb1c6991953ef82dbfeb192fbb1e33d017b /drivers/net/xen-netfront.c | |
| parent | Merge branch 'davicom-w-1-fixes' (diff) | |
| download | kernel-8ed7ec1386b646130d80d017ecd4716f866ea570.tar.gz kernel-8ed7ec1386b646130d80d017ecd4716f866ea570.zip | |
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'drivers/net/xen-netfront.c')
| -rw-r--r-- | drivers/net/xen-netfront.c | 3 |
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; |
