WSL2-Linux-Kernel/drivers/nvmem
Jerome Brunet cf51c32c00 nvmem: meson-efuse: fix function pointer type mismatch
[ Upstream commit cbd38332c140829ab752ba4e727f98be5c257f18 ]

clang-16 warns about casting functions to incompatible types, as is done
here to call clk_disable_unprepare:

drivers/nvmem/meson-efuse.c:78:12: error: cast from 'void (*)(struct clk *)' to 'void (*)(void *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict]
   78 |                                        (void(*)(void *))clk_disable_unprepare,

The pattern of getting, enabling and setting a disable callback for a
clock can be replaced with devm_clk_get_enabled(), which also fixes
this warning.

Fixes: 611fbca1c8 ("nvmem: meson-efuse: add peripheral clock")
Cc: Stable@vger.kernel.org
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Justin Stitt <justinstitt@google.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20240224114023.85535-2-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-04-10 16:18:40 +02:00
..
Kconfig
Makefile
bcm-ocotp.c
brcm_nvram.c
core.c nvmem: core: fix return value 2023-02-22 12:57:03 +01:00
imx-iim.c
imx-ocotp-scu.c
imx-ocotp.c nvmem: imx: correct nregs for i.MX6UL 2023-11-08 17:26:41 +01:00
jz4780-efuse.c
lpc18xx_eeprom.c
lpc18xx_otp.c
meson-efuse.c nvmem: meson-efuse: fix function pointer type mismatch 2024-04-10 16:18:40 +02:00
meson-mx-efuse.c
mtk-efuse.c
mxs-ocotp.c
nintendo-otp.c
qcom-spmi-sdam.c nvmem: qcom-spmi-sdam: fix module autoloading 2023-02-09 11:26:43 +01:00
qfprom.c
rave-sp-eeprom.c
rmem.c nvmem: rmem: Use NVMEM_DEVID_AUTO 2023-07-23 13:47:25 +02:00
rockchip-efuse.c
rockchip-otp.c
sc27xx-efuse.c
snvs_lpgpr.c
sprd-efuse.c
stm32-romem.c
sunxi_sid.c
uniphier-efuse.c
vf610-ocotp.c
zynqmp_nvmem.c