All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PCI: xgene: Remove unused assignment to variable msi_val
@ 2020-09-22  3:02 ` Krzysztof Wilczyński
  0 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Wilczyński @ 2020-09-22  3:02 UTC (permalink / raw)
  To: Toan Le
  Cc: Duc Dang, Bjorn Helgaas, Lorenzo Pieralisi, Rob Herring,
	linux-pci, linux-arm-kernel

The value assigned to msi_val after the inner loop finishes its run is
never used for anything, and it is also immediately overridden in the
line that follows with the return value from the xgene_msi_int_read()
function.

Since the value of msi_val following the inner loop completion is never
used in any meaningful way the assignment can be removed.

Addresses-Coverity-ID: 1437183 ("Unused value")
Signed-off-by: Krzysztof Wilczyński <kw@linux.com>
---
 drivers/pci/controller/pci-xgene-msi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/controller/pci-xgene-msi.c b/drivers/pci/controller/pci-xgene-msi.c
index 02271c6d17a1..2470782cb01a 100644
--- a/drivers/pci/controller/pci-xgene-msi.c
+++ b/drivers/pci/controller/pci-xgene-msi.c
@@ -493,8 +493,8 @@ static int xgene_msi_probe(struct platform_device *pdev)
 	 */
 	for (irq_index = 0; irq_index < NR_HW_IRQS; irq_index++) {
 		for (msi_idx = 0; msi_idx < IDX_PER_GROUP; msi_idx++)
-			msi_val = xgene_msi_ir_read(xgene_msi, irq_index,
-						    msi_idx);
+			xgene_msi_ir_read(xgene_msi, irq_index, msi_idx);
+
 		/* Read MSIINTn to confirm */
 		msi_val = xgene_msi_int_read(xgene_msi, irq_index);
 		if (msi_val) {
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-10-02 12:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-22  3:02 [PATCH] PCI: xgene: Remove unused assignment to variable msi_val Krzysztof Wilczyński
2020-09-22  3:02 ` Krzysztof Wilczyński
2020-09-22 14:52 ` Bjorn Helgaas
2020-09-22 14:52   ` Bjorn Helgaas
2020-10-01 14:42 ` Rob Herring
2020-10-01 14:42   ` Rob Herring
2020-10-02 12:00 ` Lorenzo Pieralisi
2020-10-02 12:00   ` Lorenzo Pieralisi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.