diff mbox series

[-next] fpga: dfl: fme: remove set but not used variable 'priv'

Message ID 1536888816-51700-1-git-send-email-yuehaibing@huawei.com (mailing list archive)
State Superseded, archived
Headers show
Series [-next] fpga: dfl: fme: remove set but not used variable 'priv' | expand

Commit Message

Yue Haibing Sept. 14, 2018, 1:33 a.m. UTC
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/fpga/dfl-fme-pr.c: In function 'pr_mgmt_uinit':
drivers/fpga/dfl-fme-pr.c:447:18: warning:
 variable 'priv' set but not used [-Wunused-but-set-variable]

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/fpga/dfl-fme-pr.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Wu, Hao Sept. 14, 2018, 10:23 a.m. UTC | #1
On Fri, Sep 14, 2018 at 01:33:36AM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/fpga/dfl-fme-pr.c: In function 'pr_mgmt_uinit':
> drivers/fpga/dfl-fme-pr.c:447:18: warning:
>  variable 'priv' set but not used [-Wunused-but-set-variable]

Looks good to me, thanks for this fixing.

Thanks
Hao

> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/fpga/dfl-fme-pr.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/fpga/dfl-fme-pr.c b/drivers/fpga/dfl-fme-pr.c
> index 0b84053..fe5a557 100644
> --- a/drivers/fpga/dfl-fme-pr.c
> +++ b/drivers/fpga/dfl-fme-pr.c
> @@ -444,10 +444,8 @@ static void pr_mgmt_uinit(struct platform_device *pdev,
>  			  struct dfl_feature *feature)
>  {
>  	struct dfl_feature_platform_data *pdata = dev_get_platdata(&pdev->dev);
> -	struct dfl_fme *priv;
>  
>  	mutex_lock(&pdata->lock);
> -	priv = dfl_fpga_pdata_get_private(pdata);
>  
>  	dfl_fme_destroy_regions(pdata);
>  	dfl_fme_destroy_bridges(pdata);
Moritz Fischer Sept. 14, 2018, 4:18 p.m. UTC | #2
Hi,

On Fri, Sep 14, 2018 at 3:23 AM, Wu Hao <hao.wu@intel.com> wrote:
> On Fri, Sep 14, 2018 at 01:33:36AM +0000, YueHaibing wrote:
>> Fixes gcc '-Wunused-but-set-variable' warning:
>>
>> drivers/fpga/dfl-fme-pr.c: In function 'pr_mgmt_uinit':
>> drivers/fpga/dfl-fme-pr.c:447:18: warning:
>>  variable 'priv' set but not used [-Wunused-but-set-variable]
>
> Looks good to me, thanks for this fixing.

Hao, is this an Acked-by? :)
>
> Thanks
> Hao
>
>>
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Moritz Fischer <mdf@kernel.org>
>> ---
>>  drivers/fpga/dfl-fme-pr.c | 2 --
>>  1 file changed, 2 deletions(-)
>>
>> diff --git a/drivers/fpga/dfl-fme-pr.c b/drivers/fpga/dfl-fme-pr.c
>> index 0b84053..fe5a557 100644
>> --- a/drivers/fpga/dfl-fme-pr.c
>> +++ b/drivers/fpga/dfl-fme-pr.c
>> @@ -444,10 +444,8 @@ static void pr_mgmt_uinit(struct platform_device *pdev,
>>                         struct dfl_feature *feature)
>>  {
>>       struct dfl_feature_platform_data *pdata = dev_get_platdata(&pdev->dev);
>> -     struct dfl_fme *priv;
>>
>>       mutex_lock(&pdata->lock);
>> -     priv = dfl_fpga_pdata_get_private(pdata);
>>
>>       dfl_fme_destroy_regions(pdata);
>>       dfl_fme_destroy_bridges(pdata);

Thanks for the patch,

Moritz
Wu, Hao Sept. 15, 2018, 1:52 a.m. UTC | #3
On Fri, Sep 14, 2018 at 09:18:12AM -0700, Moritz Fischer wrote:
> Hi,
> 
> On Fri, Sep 14, 2018 at 3:23 AM, Wu Hao <hao.wu@intel.com> wrote:
> > On Fri, Sep 14, 2018 at 01:33:36AM +0000, YueHaibing wrote:
> >> Fixes gcc '-Wunused-but-set-variable' warning:
> >>
> >> drivers/fpga/dfl-fme-pr.c: In function 'pr_mgmt_uinit':
> >> drivers/fpga/dfl-fme-pr.c:447:18: warning:
> >>  variable 'priv' set but not used [-Wunused-but-set-variable]
> >
> > Looks good to me, thanks for this fixing.
> 
> Hao, is this an Acked-by? :)

Sure.. thanks for reminding. :)

Acked-by: Wu Hao <hao.wu@intel.com>

Hao

> >
> > Thanks
> > Hao
> >
> >>
> >> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> Acked-by: Moritz Fischer <mdf@kernel.org>
> >> ---
> >>  drivers/fpga/dfl-fme-pr.c | 2 --
> >>  1 file changed, 2 deletions(-)
> >>
> >> diff --git a/drivers/fpga/dfl-fme-pr.c b/drivers/fpga/dfl-fme-pr.c
> >> index 0b84053..fe5a557 100644
> >> --- a/drivers/fpga/dfl-fme-pr.c
> >> +++ b/drivers/fpga/dfl-fme-pr.c
> >> @@ -444,10 +444,8 @@ static void pr_mgmt_uinit(struct platform_device *pdev,
> >>                         struct dfl_feature *feature)
> >>  {
> >>       struct dfl_feature_platform_data *pdata = dev_get_platdata(&pdev->dev);
> >> -     struct dfl_fme *priv;
> >>
> >>       mutex_lock(&pdata->lock);
> >> -     priv = dfl_fpga_pdata_get_private(pdata);
> >>
> >>       dfl_fme_destroy_regions(pdata);
> >>       dfl_fme_destroy_bridges(pdata);
> 
> Thanks for the patch,
> 
> Moritz
diff mbox series

Patch

diff --git a/drivers/fpga/dfl-fme-pr.c b/drivers/fpga/dfl-fme-pr.c
index 0b84053..fe5a557 100644
--- a/drivers/fpga/dfl-fme-pr.c
+++ b/drivers/fpga/dfl-fme-pr.c
@@ -444,10 +444,8 @@  static void pr_mgmt_uinit(struct platform_device *pdev,
 			  struct dfl_feature *feature)
 {
 	struct dfl_feature_platform_data *pdata = dev_get_platdata(&pdev->dev);
-	struct dfl_fme *priv;
 
 	mutex_lock(&pdata->lock);
-	priv = dfl_fpga_pdata_get_private(pdata);
 
 	dfl_fme_destroy_regions(pdata);
 	dfl_fme_destroy_bridges(pdata);