Re: [PATCH] platform/x86: hp-wmi: Fix cast to smaller integer type warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 1/23/23 14:28, Hans de Goede wrote:
> 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 <lkp@xxxxxxxxx>
> Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>

I have added this to my review-hans branch now.

Regards,

Hans



> ---
>  drivers/platform/x86/hp/hp-wmi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
> index 0a99058be813..9ac41950e4fc 100644
> --- a/drivers/platform/x86/hp/hp-wmi.c
> +++ b/drivers/platform/x86/hp/hp-wmi.c
> @@ -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;
>  




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux