Searched hist:"1 f428149492fbbba125378227effacba3b15c5a1" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/firmware/ |
H A D | dmi-id.c | diff 1f428149492fbbba125378227effacba3b15c5a1 Mon Apr 08 02:34:24 CDT 2024 Arnd Bergmann <arnd@arndb.de> firmware: dmi-id: add a release callback function
[ Upstream commit cf770af5645a41a753c55a053fa1237105b0964a ]
dmi_class uses kfree() as the .release function, but that now causes a warning with clang-16 as it violates control flow integrity (KCFI) rules:
drivers/firmware/dmi-id.c:174:17: error: cast from 'void (*)(const void *)' to 'void (*)(struct device *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict] 174 | .dev_release = (void(*)(struct device *)) kfree,
Add an explicit function to call kfree() instead.
Fixes: 4f5c791a850e ("DMI-based module autoloading") Link: https://lore.kernel.org/lkml/20240213100238.456912-1-arnd@kernel.org/ Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
|