* [PATCH] dmaengine: idxd: Remove redundant variable cdev_ctx
@ 2021-05-06 11:00 Jiapeng Chong
2021-05-06 15:07 ` Dave Jiang
2021-05-10 14:34 ` Vinod Koul
0 siblings, 2 replies; 3+ messages in thread
From: Jiapeng Chong @ 2021-05-06 11:00 UTC (permalink / raw)
To: dave.jiang; +Cc: vkoul, dmaengine, linux-kernel, Jiapeng Chong
Variable cdev_ctx is set to '&ictx[wq->idxd->data->type]' but this
value is not used, hence it is a redundant assignment and can be
removed.
Clean up the following clang-analyzer warning:
drivers/dma/idxd/cdev.c:300:2: warning: Value stored to 'cdev_ctx' is
never read [clang-analyzer-deadcode.DeadStores].
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
drivers/dma/idxd/cdev.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/dma/idxd/cdev.c b/drivers/dma/idxd/cdev.c
index 302cba5..6c72089 100644
--- a/drivers/dma/idxd/cdev.c
+++ b/drivers/dma/idxd/cdev.c
@@ -295,9 +295,7 @@ int idxd_wq_add_cdev(struct idxd_wq *wq)
void idxd_wq_del_cdev(struct idxd_wq *wq)
{
struct idxd_cdev *idxd_cdev;
- struct idxd_cdev_context *cdev_ctx;
- cdev_ctx = &ictx[wq->idxd->data->type];
idxd_cdev = wq->idxd_cdev;
wq->idxd_cdev = NULL;
cdev_device_del(&idxd_cdev->cdev, &idxd_cdev->dev);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] dmaengine: idxd: Remove redundant variable cdev_ctx
2021-05-06 11:00 [PATCH] dmaengine: idxd: Remove redundant variable cdev_ctx Jiapeng Chong
@ 2021-05-06 15:07 ` Dave Jiang
2021-05-10 14:34 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Dave Jiang @ 2021-05-06 15:07 UTC (permalink / raw)
To: Jiapeng Chong; +Cc: vkoul, dmaengine, linux-kernel
On 5/6/2021 4:00 AM, Jiapeng Chong wrote:
> Variable cdev_ctx is set to '&ictx[wq->idxd->data->type]' but this
> value is not used, hence it is a redundant assignment and can be
> removed.
>
> Clean up the following clang-analyzer warning:
>
> drivers/dma/idxd/cdev.c:300:2: warning: Value stored to 'cdev_ctx' is
> never read [clang-analyzer-deadcode.DeadStores].
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Acked-by: Dave Jiang <dave.jiang@intel.com>
Thanks.
> ---
> drivers/dma/idxd/cdev.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/dma/idxd/cdev.c b/drivers/dma/idxd/cdev.c
> index 302cba5..6c72089 100644
> --- a/drivers/dma/idxd/cdev.c
> +++ b/drivers/dma/idxd/cdev.c
> @@ -295,9 +295,7 @@ int idxd_wq_add_cdev(struct idxd_wq *wq)
> void idxd_wq_del_cdev(struct idxd_wq *wq)
> {
> struct idxd_cdev *idxd_cdev;
> - struct idxd_cdev_context *cdev_ctx;
>
> - cdev_ctx = &ictx[wq->idxd->data->type];
> idxd_cdev = wq->idxd_cdev;
> wq->idxd_cdev = NULL;
> cdev_device_del(&idxd_cdev->cdev, &idxd_cdev->dev);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dmaengine: idxd: Remove redundant variable cdev_ctx
2021-05-06 11:00 [PATCH] dmaengine: idxd: Remove redundant variable cdev_ctx Jiapeng Chong
2021-05-06 15:07 ` Dave Jiang
@ 2021-05-10 14:34 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2021-05-10 14:34 UTC (permalink / raw)
To: Jiapeng Chong; +Cc: dave.jiang, dmaengine, linux-kernel
On 06-05-21, 19:00, Jiapeng Chong wrote:
> Variable cdev_ctx is set to '&ictx[wq->idxd->data->type]' but this
> value is not used, hence it is a redundant assignment and can be
> removed.
>
> Clean up the following clang-analyzer warning:
>
> drivers/dma/idxd/cdev.c:300:2: warning: Value stored to 'cdev_ctx' is
> never read [clang-analyzer-deadcode.DeadStores].
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-10 14:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-06 11:00 [PATCH] dmaengine: idxd: Remove redundant variable cdev_ctx Jiapeng Chong
2021-05-06 15:07 ` Dave Jiang
2021-05-10 14:34 ` Vinod Koul
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.