]> www.infradead.org Git - users/dwmw2/linux.git/commit
nouveau: fix function cast warning
authorArnd Bergmann <arnd@arndb.de>
Thu, 4 Apr 2024 16:02:25 +0000 (18:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Apr 2024 09:15:13 +0000 (11:15 +0200)
commit5562dbfcf59b40bd1c7936d21d85cc2fab81284f
treedd510f24af81f2f8312499801bfcf89daca919a6
parent8d278fc34cdd8a44e995fa93dfd31d619a2e1fe6
nouveau: fix function cast warning

[ Upstream commit 185fdb4697cc9684a02f2fab0530ecdd0c2f15d4 ]

Calling a function through an incompatible pointer type causes breaks
kcfi, so clang warns about the assignment:

drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowof.c:73:10: error: cast from 'void (*)(const void *)' to 'void (*)(void *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict]
   73 |         .fini = (void(*)(void *))kfree,

Avoid this with a trivial wrapper.

Fixes: c39f472e9f14 ("drm/nouveau: remove symlinks, move core/ to nvkm/ (no code changes)")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240404160234.2923554-1-arnd@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowof.c