[PATCH -next] powerpc/spider-pci: Remove set but not used variable 'val'

Subsystems: cell broadband engine architecture, linux for powerpc (32-bit and 64-bit), the rest

STALE1949d LANDED

Landed in mainline as f377f7da26d2 on 2021-06-15.

4 messages, 3 authors, 2021-06-18 · open the first message on its own page

[PATCH -next] powerpc/spider-pci: Remove set but not used variable 'val'

From: Baokun Li <hidden>
Date: 2021-06-01 08:44:11

Fixes gcc '-Wunused-but-set-variable' warning:

arch/powerpc/platforms/cell/spider-pci.c: In function 'spiderpci_io_flush':
arch/powerpc/platforms/cell/spider-pci.c:28:6: warning:
variable ‘val’ set but not used [-Wunused-but-set-variable]

It never used since introduction.

Signed-off-by: Baokun Li <redacted>
---
 arch/powerpc/platforms/cell/spider-pci.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/powerpc/platforms/cell/spider-pci.c b/arch/powerpc/platforms/cell/spider-pci.c
index 93ea41680f54..a1c293f42a1f 100644
--- a/arch/powerpc/platforms/cell/spider-pci.c
+++ b/arch/powerpc/platforms/cell/spider-pci.c
@@ -25,10 +25,9 @@ struct spiderpci_iowa_private {
 static void spiderpci_io_flush(struct iowa_bus *bus)
 {
 	struct spiderpci_iowa_private *priv;
-	u32 val;
 
 	priv = bus->private;
-	val = in_be32(priv->regs + SPIDER_PCI_DUMMY_READ);
+	in_be32(priv->regs + SPIDER_PCI_DUMMY_READ);
 	iosync();
 }
 
-- 
2.31.1

Re: [PATCH -next] powerpc/spider-pci: Remove set but not used variable 'val'

From: libaokun (A) <hidden>
Date: 2021-06-15 03:19:27

ping

在 2021/6/1 16:53, Baokun Li 写道:
quoted hunk
Fixes gcc '-Wunused-but-set-variable' warning:

arch/powerpc/platforms/cell/spider-pci.c: In function 'spiderpci_io_flush':
arch/powerpc/platforms/cell/spider-pci.c:28:6: warning:
variable ‘val’ set but not used [-Wunused-but-set-variable]

It never used since introduction.

Signed-off-by: Baokun Li <redacted>
---
  arch/powerpc/platforms/cell/spider-pci.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/powerpc/platforms/cell/spider-pci.c b/arch/powerpc/platforms/cell/spider-pci.c
index 93ea41680f54..a1c293f42a1f 100644
--- a/arch/powerpc/platforms/cell/spider-pci.c
+++ b/arch/powerpc/platforms/cell/spider-pci.c
@@ -25,10 +25,9 @@ struct spiderpci_iowa_private {
  static void spiderpci_io_flush(struct iowa_bus *bus)
  {
  	struct spiderpci_iowa_private *priv;
-	u32 val;
  
  	priv = bus->private;
-	val = in_be32(priv->regs + SPIDER_PCI_DUMMY_READ);
+	in_be32(priv->regs + SPIDER_PCI_DUMMY_READ);
  	iosync();
  }
  

Re: [PATCH -next] powerpc/spider-pci: Remove set but not used variable 'val'

From: Arnd Bergmann <arnd@arndb.de>
Date: 2021-06-15 08:20:21

On Tue, Jun 1, 2021 at 10:53 AM Baokun Li [off-list ref] wrote:
Fixes gcc '-Wunused-but-set-variable' warning:

arch/powerpc/platforms/cell/spider-pci.c: In function 'spiderpci_io_flush':
arch/powerpc/platforms/cell/spider-pci.c:28:6: warning:
variable ‘val’ set but not used [-Wunused-but-set-variable]

It never used since introduction.

Signed-off-by: Baokun Li <redacted>
LGTM

Acked-by: Arnd Bergmann <arnd@arndb.de>

Re: [PATCH -next] powerpc/spider-pci: Remove set but not used variable 'val'

From: Michael Ellerman <hidden>
Date: 2021-06-18 04:24:04

On Tue, 1 Jun 2021 16:53:19 +0800, Baokun Li wrote:
Fixes gcc '-Wunused-but-set-variable' warning:

arch/powerpc/platforms/cell/spider-pci.c: In function 'spiderpci_io_flush':
arch/powerpc/platforms/cell/spider-pci.c:28:6: warning:
variable ‘val’ set but not used [-Wunused-but-set-variable]

It never used since introduction.
Applied to powerpc/next.

[1/1] powerpc/spider-pci: Remove set but not used variable 'val'
      https://git.kernel.org/powerpc/c/f377f7da26d2af87e2ddc39190546f62ecdb2bd8

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help