linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fpga: dfl: afu: remove set but not used variable 'afu'
@ 2019-12-26 12:15 yu kuai
  2019-12-27 22:58 ` Moritz Fischer
  0 siblings, 1 reply; 4+ messages in thread
From: yu kuai @ 2019-12-26 12:15 UTC (permalink / raw)
  To: hao.wu, mdf; +Cc: linux-fpga, linux-kernel, yukuai3, yi.zhang, zhengbin13

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/fpga/dfl-afu-main.c: In function ‘afu_dev_destroy’:
drivers/fpga/dfl-afu-main.c:816:18: warning: variable ‘afu’
set but not used [-Wunused-but-set-variable]

It is never used, and so can be removed.

Signed-off-by: yu kuai <yukuai3@huawei.com>
---
 drivers/fpga/dfl-afu-main.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/fpga/dfl-afu-main.c b/drivers/fpga/dfl-afu-main.c
index e4a34dc7947f..65437b6a6842 100644
--- a/drivers/fpga/dfl-afu-main.c
+++ b/drivers/fpga/dfl-afu-main.c
@@ -813,10 +813,8 @@ static int afu_dev_init(struct platform_device *pdev)
 static int afu_dev_destroy(struct platform_device *pdev)
 {
 	struct dfl_feature_platform_data *pdata = dev_get_platdata(&pdev->dev);
-	struct dfl_afu *afu;
 
 	mutex_lock(&pdata->lock);
-	afu = dfl_fpga_pdata_get_private(pdata);
 	afu_mmio_region_destroy(pdata);
 	afu_dma_region_destroy(pdata);
 	dfl_fpga_pdata_set_private(pdata, NULL);
-- 
2.17.2


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

end of thread, other threads:[~2020-01-03  4:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-26 12:15 [PATCH] fpga: dfl: afu: remove set but not used variable 'afu' yu kuai
2019-12-27 22:58 ` Moritz Fischer
2019-12-30  1:53   ` Wu Hao
2020-01-03  4:48     ` Moritz Fischer

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).