linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oded Gabbay <oded.gabbay@gmail.com>
To: YueHaibing <yuehaibing@huawei.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Linux-Kernel@Vger. Kernel. Org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -next] habanalabs: remove set but not used variable 'ctx'
Date: Sun, 29 Sep 2019 12:37:59 +0300	[thread overview]
Message-ID: <CAFCwf101qKdfNtYEpb4PGw8CA02R+t80FKx-Lq9taff69L08bQ@mail.gmail.com> (raw)
In-Reply-To: <20190928041804.41656-1-yuehaibing@huawei.com>

On Sat, Sep 28, 2019 at 7:18 AM YueHaibing <yuehaibing@huawei.com> wrote:
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/misc/habanalabs/device.c: In function hpriv_release:
> drivers/misc/habanalabs/device.c:45:17: warning: variable ctx set but not used [-Wunused-but-set-variable]
>
> It is never used since commit eb7caf84b029 ("habanalabs:
> maintain a list of file private data objects")
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/misc/habanalabs/device.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/misc/habanalabs/device.c b/drivers/misc/habanalabs/device.c
> index 459fee7..2f5a4da 100644
> --- a/drivers/misc/habanalabs/device.c
> +++ b/drivers/misc/habanalabs/device.c
> @@ -42,12 +42,10 @@ static void hpriv_release(struct kref *ref)
>  {
>         struct hl_fpriv *hpriv;
>         struct hl_device *hdev;
> -       struct hl_ctx *ctx;
>
>         hpriv = container_of(ref, struct hl_fpriv, refcount);
>
>         hdev = hpriv->hdev;
> -       ctx = hpriv->ctx;
>
>         put_pid(hpriv->taskpid);
>
> --
> 2.7.4
>
>

This patch is:
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Applied to -next.
Thanks,
Oded

      reply	other threads:[~2019-09-29  9:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-28  4:18 [PATCH -next] habanalabs: remove set but not used variable 'ctx' YueHaibing
2019-09-29  9:37 ` Oded Gabbay [this message]

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=CAFCwf101qKdfNtYEpb4PGw8CA02R+t80FKx-Lq9taff69L08bQ@mail.gmail.com \
    --to=oded.gabbay@gmail.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yuehaibing@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;
as well as URLs for NNTP newsgroup(s).