The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] dmaengine: idxd: Fix warning for deadcode.deadstore
@ 2025-05-21 23:13 Anil S Keshavamurthy
  2025-05-21 23:13 ` Dave Jiang
  2025-06-26 22:48 ` Vinod Koul
  0 siblings, 2 replies; 3+ messages in thread
From: Anil S Keshavamurthy @ 2025-05-21 23:13 UTC (permalink / raw)
  To: dave.jiang, vinicius.gomes, fenghuay, vkoul
  Cc: anil.s.keshavamurthy, dmaengine, linux-kernel

Deletes the  second initialization as the value stored to 'dev' during
its initialization (struct device *dev = &idxd->pdev->dev;) is
sufficient.

../drivers/dma/idxd/init.c:988:17: warning: Value stored to 'dev' during
its initialization is never read [deadcode.DeadStores]
  988 |         struct device *dev = &idxd->pdev->dev;
      |                        ^~~   ~~~~~~~~~~~~~~~~

Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
---
 drivers/dma/idxd/init.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/dma/idxd/init.c b/drivers/dma/idxd/init.c
index fca1d2924999..b7664136fc67 100644
--- a/drivers/dma/idxd/init.c
+++ b/drivers/dma/idxd/init.c
@@ -989,7 +989,6 @@ static void idxd_reset_prepare(struct pci_dev *pdev)
 	const char *idxd_name;
 	int rc;
 
-	dev = &idxd->pdev->dev;
 	idxd_name = dev_name(idxd_confdev(idxd));
 
 	struct idxd_saved_states *idxd_saved __free(kfree) =
-- 
2.47.1


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

end of thread, other threads:[~2025-06-26 22:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-21 23:13 [PATCH] dmaengine: idxd: Fix warning for deadcode.deadstore Anil S Keshavamurthy
2025-05-21 23:13 ` Dave Jiang
2025-06-26 22:48 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox