LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH linux-next] drm/nouveau/mmu/gp100-: drop unneeded assignment in the if condition.
@ 2021-08-21  2:14 CGEL
  2021-09-28 11:17 ` Karol Herbst
  0 siblings, 1 reply; 2+ messages in thread
From: CGEL @ 2021-08-21  2:14 UTC (permalink / raw)
  To: Ben Skeggs
  Cc: David Airlie, Daniel Vetter, Alistair Popple, dri-devel, nouveau,
	linux-kernel, Luo penghao, Zeal Robot

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-28 11:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-21  2:14 [PATCH linux-next] drm/nouveau/mmu/gp100-: drop unneeded assignment in the if condition CGEL
2021-09-28 11:17 ` Karol Herbst

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).