Patchwork pciinit: remove unused variable, old_addr, in pci_set_io_region_addr().

login
register
mail settings
Submitter Isaku Yamahata
Date Aug. 30, 2010, 2:32 a.m.
Message ID <20100830023201.GB22847@valinux.co.jp>
Download mbox | patch
Permalink /patch/62983/
State New
Headers show

Comments

Isaku Yamahata - Aug. 30, 2010, 2:32 a.m.
old_addr is initialized, but not used.
remove the useless variable.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
---
 src/pciinit.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
Kevin O'Connor - Sept. 3, 2010, 1:40 a.m.
On Mon, Aug 30, 2010 at 11:32:01AM +0900, Isaku Yamahata wrote:
> old_addr is initialized, but not used.
> remove the useless variable.
> 
> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>

Thanks.
-Kevin

Patch

diff --git a/src/pciinit.c b/src/pciinit.c
index f75e552..0346423 100644
--- a/src/pciinit.c
+++ b/src/pciinit.c
@@ -39,12 +39,10 @@  static u32 pci_bar(u16 bdf, int region_num)
 
 static void pci_set_io_region_addr(u16 bdf, int region_num, u32 addr)
 {
-    u32 ofs, old_addr;
+    u32 ofs;
 
     ofs = pci_bar(bdf, region_num);
 
-    old_addr = pci_config_readl(bdf, ofs);
-
     pci_config_writel(bdf, ofs, addr);
     dprintf(1, "region %d: 0x%08x\n", region_num, addr);
 }