Skip to contentSkip to conversation

esp-pci: simple clean up

PATCH In review weiqi 2 participants 2 messages Apr 7, 2017

lore
Share & tools
lore

weiqi

author
#0 lore raw

PATCH 3/3 esp-pci: simple clean up

From: Wei Qi <[email protected]>

It is unnecessary to assign variable 'size' here, because 'size' unused after assignment.

---
 hw/scsi/esp-pci.c | 1 -
 1 file changed, 1 deletion(-)
hw/scsi/esp-pci.c +0 -1
index e295d88..1f5980e 100644
@@ -192,7 +192,6 @@ static void esp_pci_io_write(void *opaque, hwaddr addr,
         val <<= shift;
         val |= current & ~(mask << shift);
         addr &= ~3;
-        size = 4;
     }
 
     if (addr < 0x40) {
Signature · 1 line
1.8.3.1
Reviewed-by on v1 3/3
#1 lore raw
Quoted 8 lines · weiqi

From: Wei Qi <[email protected]>

It is unnecessary to assign variable 'size' here, because 'size' unused after assignment.

---
 hw/scsi/esp-pci.c | 1 -
 1 file changed, 1 deletion(-)

hw/scsi/esp-pci.c static void esp_pci_io_write(void *opaque, hwaddr addr, · line 195

Quoted 10 lines
hw/scsi/esp-pci.c +0 -1
index e295d88..1f5980e 100644
@@ -192,7 +192,6 @@ static void esp_pci_io_write(void *opaque, hwaddr addr,
         val <<= shift;
         val |= current & ~(mask << shift);
         addr &= ~3;
-        size = 4;

I verified that 'size' is passed by value to 'esp_pci_io_write(...)', no loop, no recursivity.

Quoted 7 lines
hw/scsi/esp-pci.c +0 -0
     }
 
     if (addr < 0x40) {
Signature · 1 line
1.8.3.1