Skip to content

Commit

Permalink
ieee802154: remove set but not used variable 'status'
Browse files Browse the repository at this point in the history
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/net/ieee802154/cc2520.c:221:5: warning:
 variable status set but not used [-Wunused-but-set-variable]

It is never used, so can be removed.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
  • Loading branch information
YueHaibing authored and Stefan Schmidt committed Oct 28, 2019
1 parent a734d1f commit 693463e
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/net/ieee802154/cc2520.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ static int
cc2520_cmd_strobe(struct cc2520_private *priv, u8 cmd)
{
int ret;
u8 status = 0xff;
struct spi_message msg;
struct spi_transfer xfer = {
.len = 0,
Expand All @@ -241,8 +240,6 @@ cc2520_cmd_strobe(struct cc2520_private *priv, u8 cmd)
priv->buf[0]);

ret = spi_sync(priv->spi, &msg);
if (!ret)
status = priv->buf[0];
dev_vdbg(&priv->spi->dev,
"buf[0] = %02x\n", priv->buf[0]);
mutex_unlock(&priv->buffer_mutex);
Expand Down

0 comments on commit 693463e

Please sign in to comment.