dmaengine: idxd: remove set but not used variable 'group'
Subsystems (2)
PATCH 1/1 dmaengine: idxd: remove set but not used variable 'group'
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 <[email protected]>
Signed-off-by YueHaibing <[email protected]>
--- drivers/dma/idxd/sysfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/dma/idxd/sysfs.c +1 -2
@@ -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)
Signature · 1 line
2.7.4
Quoted 7 lines · YueHaibing
drivers/dma/idxd/sysfs.c: In functionengine_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 <[email protected]>Signed-off-by YueHaibing <[email protected]>
Acked-by Dave Jiang <[email protected]>
Quoted 26 lines
--- drivers/dma/idxd/sysfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/dma/idxd/sysfs.c +1
-2@@ -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)
Quoted 4 lines · YueHaibing
drivers/dma/idxd/sysfs.c: In functionengine_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
Signature · 1 line
~Vinod