]> git.hungrycats.org Git - linux/commit
drm/nouveau/instmem: fix uninitialized_var.cocci warning
authorGuo Zhengkui <guozhengkui@vivo.com>
Mon, 28 Feb 2022 14:23:50 +0000 (22:23 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Mar 2024 12:21:59 +0000 (13:21 +0100)
commit6dae096960bcc91996ffc6239ce4be6fda2abaeb
tree6b4d31ab52f542438f468e28873ae3648abe3f68
parent4d3b2bd995ed993756ac43f3bc5be7688e66c8fa
drm/nouveau/instmem: fix uninitialized_var.cocci warning

[ Upstream commit 2046e733e125fa58ed997f3d26d43543faf82c95 ]

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/20121028102007.GA7547@gmail.com/
And there is very few "/* GCC */" comments in the Linux kernel code now.

Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220228142352.18006-1-guozhengkui@vivo.com
Stable-dep-of: 3b1ae9b71c2a ("octeontx2-af: Consider the action set by PF")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c