spi: npcm: Remove set but not used variable 'val'
authorzhengbin <zhengbin13@huawei.com>
Wed, 9 Oct 2019 00:37:17 +0000 (08:37 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 9 Oct 2019 17:20:16 +0000 (18:20 +0100)
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/spi/spi-npcm-pspi.c: In function npcm_pspi_handler:
drivers/spi/spi-npcm-pspi.c:296:6: warning: variable val set but not used [-Wunused-but-set-variable]

It is not used since commit 2a22f1b30cee ("spi:
npcm: add NPCM PSPI controller driver")

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Link: https://lore.kernel.org/r/1570581437-104549-3-git-send-email-zhengbin13@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-npcm-pspi.c

index b191d57..fe62473 100644 (file)
@@ -293,7 +293,6 @@ static void npcm_pspi_reset_hw(struct npcm_pspi *priv)
 static irqreturn_t npcm_pspi_handler(int irq, void *dev_id)
 {
        struct npcm_pspi *priv = dev_id;
-       u16 val;
        u8 stat;
 
        stat = ioread8(priv->base + NPCM_PSPI_STAT);
@@ -303,7 +302,7 @@ static irqreturn_t npcm_pspi_handler(int irq, void *dev_id)
 
        if (priv->tx_buf) {
                if (stat & NPCM_PSPI_STAT_RBF) {
-                       val = ioread8(NPCM_PSPI_DATA + priv->base);
+                       ioread8(NPCM_PSPI_DATA + priv->base);
                        if (priv->tx_bytes == 0) {
                                npcm_pspi_disable(priv);
                                complete(&priv->xfer_done);