platform/x86: hp-wmi: Fix cast to smaller integer type warning
PATCH 1/1 platform/x86: hp-wmi: Fix cast to smaller integer type warning
Fix the following compiler warning:
drivers/platform/x86/hp/hp-wmi.c:551:24: warning: cast to smaller integer
type 'enum hp_wmi_radio' from 'void *' [-Wvoid-pointer-to-enum-cast]
Reported-by kernel test robot <[email protected]>
Signed-off-by Hans de Goede <[email protected]>
--- drivers/platform/x86/hp/hp-wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/hp/hp-wmi.c +1 -1
@@ -548,7 +548,7 @@ static int __init hp_wmi_enable_hotkeys(void)static int hp_wmi_set_block (void *data,bool blocked) { -enum hp_wmi_radio r = (enum hp_wmi_radio ) data; +enum hp_wmi_radio r = (long )data;int query =BIT (r +8 ) | ((!blocked) << r);int ret;
Signature · 1 line
2.39.0
Hi,
Quoted 7 lines · Hans de Goede
Fix the following compiler warning:
drivers/platform/x86/hp/hp-wmi.c:551:24: warning: cast to smaller integer
type 'enumhp_wmi_radio' from 'void *' [-Wvoid-pointer-to-enum-cast]Reported-by kernel test robot <[email protected]>Signed-off-by Hans de Goede <[email protected]>
I have added this to my review-hans branch now.
Regards,
Hans
Quoted 17 lines
--- drivers/platform/x86/hp/hp-wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/platform/x86/hp/hp-wmi.c +1
-1@@ -548,7 +548,7 @@ static int __init hp_wmi_enable_hotkeys(void)static int hp_wmi_set_block (void *data,bool blocked) { -enum hp_wmi_radio r = (enum hp_wmi_radio ) data; +enum hp_wmi_radio r = (long )data;int query =BIT (r +8 ) | ((!blocked) << r);int ret;