nouveau.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Karol Herbst <kherbst@redhat.com>
To: CGEL <cgel.zte@gmail.com>
Cc: Ben Skeggs <bskeggs@redhat.com>, David Airlie <airlied@linux.ie>,
	 Daniel Vetter <daniel@ffwll.ch>,
	Alistair Popple <apopple@nvidia.com>,
	 dri-devel <dri-devel@lists.freedesktop.org>,
	nouveau <nouveau@lists.freedesktop.org>,
	 LKML <linux-kernel@vger.kernel.org>,
	Luo penghao <luo.penghao@zte.com.cn>,
	 Zeal Robot <zealci@zte.com.cn>
Subject: Re: [Nouveau] [PATCH linux-next] drm/nouveau/mmu/gp100-: drop unneeded assignment in the if condition.
Date: Tue, 28 Sep 2021 13:17:50 +0200	[thread overview]
Message-ID: <CACO55tt3FF1gEffPjQTS+m3oW1yWG_xUQL_kP=kezyesj_oYkg@mail.gmail.com> (raw)
In-Reply-To: <20210821021447.27097-1-luo.penghao@zte.com.cn>

Reviewed-by: Karol Herbst <kherbst@redhat.com>

but I will remove the unnecessary brackets as well

On Sat, Aug 21, 2021 at 10:46 AM CGEL <cgel.zte@gmail.com> wrote:
>
> From: Luo penghao <luo.penghao@zte.com.cn>
>
> In order to keep the code style consistency of the whole file,
> the 'inst' assignments should be deleted.
>
> The clang_analyzer complains as follows:
>
> drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp100.c:499:8: warning:
> Although the value storedto 'inst' is used in the enclosing expression,
> the value is never actually read from 'inst'.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Luo penghao <luo.penghao@zte.com.cn>
> ---
>  drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp100.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp100.c
> index f02abd9..5d7766a 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp100.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp100.c
> @@ -502,7 +502,7 @@ gp100_vmm_fault_cancel(struct nvkm_vmm *vmm, void *argv, u32 argc)
>         args->v0.inst |= 0x80000000;
>
>         if (!WARN_ON(nvkm_gr_ctxsw_pause(device))) {
> -               if ((inst = nvkm_gr_ctxsw_inst(device)) == args->v0.inst) {
> +               if ((nvkm_gr_ctxsw_inst(device)) == args->v0.inst) {
>                         gf100_vmm_invalidate(vmm, 0x0000001b
>                                              /* CANCEL_TARGETED. */ |
>                                              (args->v0.hub    << 20) |
> --
> 2.15.2
>
>


      reply	other threads:[~2021-09-28 11:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-21  2:14 [Nouveau] [PATCH linux-next] drm/nouveau/mmu/gp100-: drop unneeded assignment in the if condition CGEL
2021-09-28 11:17 ` Karol Herbst [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='CACO55tt3FF1gEffPjQTS+m3oW1yWG_xUQL_kP=kezyesj_oYkg@mail.gmail.com' \
    --to=kherbst@redhat.com \
    --cc=airlied@linux.ie \
    --cc=apopple@nvidia.com \
    --cc=bskeggs@redhat.com \
    --cc=cgel.zte@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luo.penghao@zte.com.cn \
    --cc=nouveau@lists.freedesktop.org \
    --cc=zealci@zte.com.cn \
    /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).