Skip to contentSkip to conversation

atm: solos-pci: remove useless variable assignments

PATCH Applied Gustavo A. R. Silva 2 participants 3 messages Jun 15, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 atm: solos-pci: remove useless variable assignments

Value assigned to variable _data32_ at lines 1254 and 1257 is overwritten at line 1260 before it can be used. This makes such variable assignments useless.

Addresses-Coverity-ID: 1227049

---
 drivers/atm/solos-pci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/atm/solos-pci.c +2 -2
index 5ad037c..9115b29 100644
@@ -1251,10 +1251,10 @@ static int fpga_probe(struct pci_dev *dev, const struct pci_device_id *id)
 
 	if (reset) {
 		iowrite32(1, card->config_regs + FPGA_MODE);
-		data32 = ioread32(card->config_regs + FPGA_MODE); 
+		ioread32(card->config_regs + FPGA_MODE);
 
 		iowrite32(0, card->config_regs + FPGA_MODE);
-		data32 = ioread32(card->config_regs + FPGA_MODE); 
+		ioread32(card->config_regs + FPGA_MODE);
 	}
 
 	data32 = ioread32(card->config_regs + FPGA_VER);
Signature · 1 line
2.5.0
maintainer Applied
#1 lore raw

From: "Gustavo A. R. Silva" <[email protected]>
Date: Thu, 15 Jun 2017 14:56:21 -0500

Quoted 6 lines

Value assigned to variable _data32_ at lines 1254 and 1257 is overwritten at line 1260 before it can be used. This makes such variable assignments useless.

Addresses-Coverity-ID: 1227049

Applied, thanks.

#2 lore raw

Hi David,

Quoting David Miller <[email protected]>:

Quoted 11 lines

From: "Gustavo A. R. Silva" <[email protected]>
Date: Thu, 15 Jun 2017 14:56:21 -0500

Quoted 6 lines

Value assigned to variable _data32_ at lines 1254 and 1257 is overwritten at line 1260 before it can be used. This makes such variable assignments useless.

Addresses-Coverity-ID: 1227049

Applied, thanks.

Absolutely, glad to help.

Regards