linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] dmaengine: idxd: remove set but not used variable 'group'
@ 2020-02-11 13:53 YueHaibing
  2020-02-11 16:14 ` Dave Jiang
  2020-02-13 13:48 ` Vinod Koul
  0 siblings, 2 replies; 3+ messages in thread
From: YueHaibing @ 2020-02-11 13:53 UTC (permalink / raw)
  To: dave.jiang, dan.j.williams, vkoul; +Cc: dmaengine, linux-kernel, YueHaibing

drivers/dma/idxd/sysfs.c: In function engine_group_id_store:
drivers/dma/idxd/sysfs.c:419:29: warning: variable group set but not used [-Wunused-but-set-variable]

It is not used, so remove it.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/dma/idxd/sysfs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/dma/idxd/sysfs.c b/drivers/dma/idxd/sysfs.c
index 6d907fe..e4f35bd 100644
--- a/drivers/dma/idxd/sysfs.c
+++ b/drivers/dma/idxd/sysfs.c
@@ -416,7 +416,7 @@ static ssize_t engine_group_id_store(struct device *dev,
 	struct idxd_device *idxd = engine->idxd;
 	long id;
 	int rc;
-	struct idxd_group *prevg, *group;
+	struct idxd_group *prevg;
 
 	rc = kstrtol(buf, 10, &id);
 	if (rc < 0)
@@ -436,7 +436,6 @@ static ssize_t engine_group_id_store(struct device *dev,
 		return count;
 	}
 
-	group = &idxd->groups[id];
 	prevg = engine->group;
 
 	if (prevg)
-- 
2.7.4



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

* Re: [PATCH -next] dmaengine: idxd: remove set but not used variable 'group'
  2020-02-11 13:53 [PATCH -next] dmaengine: idxd: remove set but not used variable 'group' YueHaibing
@ 2020-02-11 16:14 ` Dave Jiang
  2020-02-13 13:48 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Dave Jiang @ 2020-02-11 16:14 UTC (permalink / raw)
  To: YueHaibing, dan.j.williams, vkoul; +Cc: dmaengine, linux-kernel



On 2/11/20 6:53 AM, YueHaibing wrote:
> drivers/dma/idxd/sysfs.c: In function engine_group_id_store:
> drivers/dma/idxd/sysfs.c:419:29: warning: variable group set but not used [-Wunused-but-set-variable]
> 
> It is not used, so remove it.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Acked-by: Dave Jiang <dave.jiang@intel.com>

> ---
>   drivers/dma/idxd/sysfs.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/dma/idxd/sysfs.c b/drivers/dma/idxd/sysfs.c
> index 6d907fe..e4f35bd 100644
> --- a/drivers/dma/idxd/sysfs.c
> +++ b/drivers/dma/idxd/sysfs.c
> @@ -416,7 +416,7 @@ static ssize_t engine_group_id_store(struct device *dev,
>   	struct idxd_device *idxd = engine->idxd;
>   	long id;
>   	int rc;
> -	struct idxd_group *prevg, *group;
> +	struct idxd_group *prevg;
>   
>   	rc = kstrtol(buf, 10, &id);
>   	if (rc < 0)
> @@ -436,7 +436,6 @@ static ssize_t engine_group_id_store(struct device *dev,
>   		return count;
>   	}
>   
> -	group = &idxd->groups[id];
>   	prevg = engine->group;
>   
>   	if (prevg)
> 

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

* Re: [PATCH -next] dmaengine: idxd: remove set but not used variable 'group'
  2020-02-11 13:53 [PATCH -next] dmaengine: idxd: remove set but not used variable 'group' YueHaibing
  2020-02-11 16:14 ` Dave Jiang
@ 2020-02-13 13:48 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2020-02-13 13:48 UTC (permalink / raw)
  To: YueHaibing; +Cc: dave.jiang, dan.j.williams, dmaengine, linux-kernel

On 11-02-20, 21:53, YueHaibing wrote:
> drivers/dma/idxd/sysfs.c: In function engine_group_id_store:
> drivers/dma/idxd/sysfs.c:419:29: warning: variable group set but not used [-Wunused-but-set-variable]
> 
> It is not used, so remove it.

Applied, thanks

-- 
~Vinod

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-11 13:53 [PATCH -next] dmaengine: idxd: remove set but not used variable 'group' YueHaibing
2020-02-11 16:14 ` Dave Jiang
2020-02-13 13: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).