OpenCloudOS-Kernel/drivers/power/reset
Justin Stitt 4ec7b666fb power: vexpress: fix -Wvoid-pointer-to-enum-cast warning
When building with clang 18 I see the following warning:
|       drivers/power/reset/vexpress-poweroff.c:124:10: warning: cast to smaller integer type 'enum vexpress_reset_func' from 'const void *' [-Wvoid-pointer-to-enum-cast]
|         124 |         switch ((enum vexpress_reset_func)match->data) {

This is due to the fact that `match->data` is a void* while `enum vexpress_reset_func`
has the size of an int. This leads to truncation and possible data loss.

Link: https://github.com/ClangBuiltLinux/linux/issues/1910
Reported-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Justin Stitt <justinstitt@google.com>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2023-09-12 20:17:31 +02:00
..
Kconfig pwr-mlxbf: extend Kconfig to include gpio-mlxbf3 dependency 2023-09-12 20:09:35 +02:00
Makefile power: reset: oxnas-restart: remove obsolete restart driver 2023-07-20 00:29:18 +02:00
arm-versatile-reboot.c power/reset: arm-versatile: Fix refcount leak in versatile_reboot_probe 2022-06-09 21:08:38 +02:00
as3722-poweroff.c power: Explicitly include correct DT includes 2023-07-19 22:47:03 +02:00
at91-poweroff.c power: reset: at91-poweroff: Convert to devm_platform_ioremap_resource() 2023-07-19 23:28:58 +02:00
at91-reset.c power: reset: at91-reset: add sysfs interface to the power on reason 2023-07-19 23:15:21 +02:00
at91-sama5d2_shdwc.c power: reset: at91-sama5d2_shdwc: Convert to devm_platform_ioremap_resource() 2023-07-19 23:28:58 +02:00
atc260x-poweroff.c power: reset: Add poweroff driver for ATC260x PMICs 2021-01-13 22:17:23 +01:00
axxia-reset.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 284 2019-06-05 17:36:37 +02:00
brcm-kona-reset.c power: reset: brcm-kona: Convert to devm_platform_ioremap_resource() 2023-07-19 23:28:59 +02:00
brcmstb-reboot.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 2) 2022-06-10 14:51:35 +02:00
gemini-poweroff.c power: reset: gemini-poweroff: Convert to devm_platform_ioremap_resource() 2023-07-19 23:28:59 +02:00
gpio-poweroff.c power: Explicitly include correct DT includes 2023-07-19 22:47:03 +02:00
gpio-restart.c power: Explicitly include correct DT includes 2023-07-19 22:47:03 +02:00
hisi-reboot.c power: reset: hisi-reboot: add missing MODULE_DEVICE_TABLE 2021-04-09 13:50:01 +02:00
keystone-reset.c power: Explicitly include correct DT includes 2023-07-19 22:47:03 +02:00
linkstation-poweroff.c power: reset: linkstation-poweroff: add new device 2021-08-13 19:16:41 +02:00
ltc2952-poweroff.c power: reset: remove MODULE_LICENSE in non-modules 2023-04-13 13:13:53 -07:00
msm-poweroff.c power: reset: msm: Convert to devm_platform_ioremap_resource() 2023-07-19 23:31:49 +02:00
mt6323-poweroff.c power: reset: mt6397: remove MODULE_LICENSE in non-modules 2023-04-13 13:13:52 -07:00
nvmem-reboot-mode.c power: reset: nvmem-reboot-mode: use NVMEM as reboot mode write interface 2019-06-25 23:58:40 +02:00
ocelot-reset.c power: reset: ocelot: Convert to devm_platform_ioremap_resource() 2023-07-19 23:31:49 +02:00
odroid-go-ultra-poweroff.c power: Explicitly include correct DT includes 2023-07-19 22:47:03 +02:00
piix4-poweroff.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
pwr-mlxbf.c power: reset: use capital "OR" for multiple licenses in SPDX 2023-09-12 20:11:23 +02:00
qcom-pon.c power: reset: qcom-pon: add support for pm8941-pon 2023-06-09 21:18:17 +02:00
qnap-poweroff.c power: reset: Use printk format symbol resolver 2020-11-30 02:10:18 +01:00
reboot-mode.c power: reset: reboot-mode: Fix author email format 2019-09-02 21:05:59 +02:00
regulator-poweroff.c power: reset: remove MODULE_LICENSE in non-modules 2023-04-13 13:13:53 -07:00
restart-poweroff.c power: reset: remove MODULE_LICENSE in non-modules 2023-04-13 13:13:53 -07:00
rmobile-reset.c power: reset: convert to SPDX identifiers 2018-09-16 11:42:48 +02:00
sc27xx-poweroff.c power supply and reset changes for the v5.7 series 2020-04-05 13:47:57 -07:00
st-poweroff.c power: Explicitly include correct DT includes 2023-07-19 22:47:03 +02:00
syscon-poweroff.c power: Explicitly include correct DT includes 2023-07-19 22:47:03 +02:00
syscon-reboot-mode.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
syscon-reboot.c power: Explicitly include correct DT includes 2023-07-19 22:47:03 +02:00
tps65086-restart.c power: reset: remove MODULE_LICENSE in non-modules 2023-04-13 13:13:53 -07:00
vexpress-poweroff.c power: vexpress: fix -Wvoid-pointer-to-enum-cast warning 2023-09-12 20:17:31 +02:00
xgene-reboot.c power: Explicitly include correct DT includes 2023-07-19 22:47:03 +02:00