dmaengine.vger.kernel.org archive mirror
 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

* Re: [PATCH] dmaengine: idxd: Fix warning for deadcode.deadstore
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Dave Jiang @ 2025-05-21 23:13 UTC (permalink / raw)
  To: Anil S Keshavamurthy, vinicius.gomes, fenghuay, vkoul
  Cc: dmaengine, linux-kernel



On 5/21/25 4:13 PM, Anil S Keshavamurthy wrote:
> 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>

Reviewed-by: Dave Jiang <dave.jiang@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) =


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

* Re: [PATCH] dmaengine: idxd: Fix warning for deadcode.deadstore
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2025-06-26 22:48 UTC (permalink / raw)
  To: dave.jiang, vinicius.gomes, fenghuay, Anil S Keshavamurthy
  Cc: dmaengine, linux-kernel


On Wed, 21 May 2025 19:13:31 -0400, Anil S Keshavamurthy wrote:
> 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;
>       |                        ^~~   ~~~~~~~~~~~~~~~~
> 
> [...]

Applied, thanks!

[1/1] dmaengine: idxd: Fix warning for deadcode.deadstore
      commit: 8c2442663f683f4fabadb3c491821169da6c89a8

Best regards,
-- 
~Vinod



^ permalink raw reply	[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;
as well as URLs for NNTP newsgroup(s).