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 <[email protected]>
---
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
On Thu, Dec 26, 2019 at 08:15:33PM +0800, yu kuai wrote:
> 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 <[email protected]>
> ---
> 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
>
Acked-by: Moritz Fischer <[email protected]>
I'll get to the patches in the new year.
Thanks,
Moritz
On Fri, Dec 27, 2019 at 02:58:09PM -0800, Moritz Fischer wrote:
> On Thu, Dec 26, 2019 at 08:15:33PM +0800, yu kuai wrote:
> > 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 <[email protected]>
> > ---
> > 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
> >
> Acked-by: Moritz Fischer <[email protected]>
>
> I'll get to the patches in the new year.
Thanks Kuai and Moritz. :)
Acked-by: Wu Hao <[email protected]>
Hao
>
> Thanks,
> Moritz
On Mon, Dec 30, 2019 at 09:53:12AM +0800, Wu Hao wrote:
> On Fri, Dec 27, 2019 at 02:58:09PM -0800, Moritz Fischer wrote:
> > On Thu, Dec 26, 2019 at 08:15:33PM +0800, yu kuai wrote:
> > > 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 <[email protected]>
> > > ---
> > > 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
> > >
> > Acked-by: Moritz Fischer <[email protected]>
> >
> > I'll get to the patches in the new year.
>
> Thanks Kuai and Moritz. :)
>
> Acked-by: Wu Hao <[email protected]>
>
> Hao
> >
> > Thanks,
> > Moritz
Applied to for-next.
Thanks,
Moritz