Skip to content

Commit

Permalink
drm/nouveau/instmem: fix uninitialized_var.cocci warning
Browse files Browse the repository at this point in the history
Fix following coccicheck warning:
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c:316:11-12:
WARNING this kind of initialization is deprecated.

`void *map = map` has the same form of
uninitialized_var() macro. I remove the redundant assignement. It has
been tested with gcc (Debian 8.3.0-6) 8.3.0.

The patch which removed uninitialized_var() is:
https://lore.kernel.org/all/[email protected]/
And there is very few "/* GCC */" comments in the Linux kernel code now.

Signed-off-by: Guo Zhengkui <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
Signed-off-by: Lyude Paul <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
Guo Zhengkui authored and Lyude committed Mar 3, 2022
1 parent 701920c commit 2046e73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ nv50_instobj_dtor(struct nvkm_memory *memory)
struct nv50_instobj *iobj = nv50_instobj(memory);
struct nvkm_instmem *imem = &iobj->imem->base;
struct nvkm_vma *bar;
void *map = map;
void *map;

mutex_lock(&imem->mutex);
if (likely(iobj->lru.next))
Expand Down

0 comments on commit 2046e73

Please sign in to comment.