public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Moritz Fischer <mdf@kernel.org>
To: yu kuai <yukuai3@huawei.com>
Cc: hao.wu@intel.com, mdf@kernel.org, linux-fpga@vger.kernel.org,
	linux-kernel@vger.kernel.org, yi.zhang@huawe.com,
	zhengbin13@huawei.com
Subject: Re: [PATCH] fpga: dfl: fme: remove set but not used variable 'fme'
Date: Fri, 27 Dec 2019 14:57:26 -0800	[thread overview]
Message-ID: <20191227225726.GA1643@archbook> (raw)
In-Reply-To: <20191226121638.10507-1-yukuai3@huawei.com>

On Thu, Dec 26, 2019 at 08:16:38PM +0800, yu kuai wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/fpga/dfl-fme-main.c: In function ‘fme_dev_destroy’:
> drivers/fpga/dfl-fme-main.c:678:18: warning: variable ‘fme’ 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-fme-main.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/fpga/dfl-fme-main.c b/drivers/fpga/dfl-fme-main.c
> index 7c930e6b314d..1d4690c99268 100644
> --- a/drivers/fpga/dfl-fme-main.c
> +++ b/drivers/fpga/dfl-fme-main.c
> @@ -675,10 +675,8 @@ static int fme_dev_init(struct platform_device *pdev)
>  static void fme_dev_destroy(struct platform_device *pdev)
>  {
>  	struct dfl_feature_platform_data *pdata = dev_get_platdata(&pdev->dev);
> -	struct dfl_fme *fme;
>  
>  	mutex_lock(&pdata->lock);
> -	fme = dfl_fpga_pdata_get_private(pdata);
>  	dfl_fpga_pdata_set_private(pdata, NULL);
>  	mutex_unlock(&pdata->lock);
>  }
> -- 
> 2.17.2
> 
Acked-by: Moritz Fischer <mdf@kernel.org>

Thanks,
Moritz

  reply	other threads:[~2019-12-27 22:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-26 12:16 [PATCH] fpga: dfl: fme: remove set but not used variable 'fme' yu kuai
2019-12-27 22:57 ` Moritz Fischer [this message]
2019-12-30  1:51   ` Wu Hao
2020-01-03  4:49     ` Moritz Fischer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191227225726.GA1643@archbook \
    --to=mdf@kernel.org \
    --cc=hao.wu@intel.com \
    --cc=linux-fpga@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yi.zhang@huawe.com \
    --cc=yukuai3@huawei.com \
    --cc=zhengbin13@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox