Re: [PATCH] net: intel: ice: Use uintptr_t for casting data

From: Nguyen, Anthony L
Date: Fri Oct 09 2020 - 12:35:42 EST


On Fri, 2020-10-09 at 14:18 +0800, Pujin Shi wrote:
> Fix up a compiler error on 64bit architectures where pointers.
>
> In file included from
> drivers/net/ethernet/intel/ice/ice_flex_pipe.c:6:0:
> drivers/net/ethernet/intel/ice/ice_flex_pipe.c: In function
> 'ice_free_flow_profs':
> drivers/net/ethernet/intel/ice/ice_flow.h:197:33: warning: cast from
> pointer to integer of different size [-Wpointer-to-int-cast]
> #define ICE_FLOW_ENTRY_HNDL(e) ((u64)e)
> ^
> drivers/net/ethernet/intel/ice/ice_flex_pipe.c:2882:9: note: in
> expansion of macro 'ICE_FLOW_ENTRY_HNDL'
> ICE_FLOW_ENTRY_HNDL(e));
> ^
> In file included from drivers/net/ethernet/intel/ice/ice_flow.c:5:0:
> drivers/net/ethernet/intel/ice/ice_flow.c: In function
> 'ice_flow_add_entry':
> drivers/net/ethernet/intel/ice/ice_flow.h:197:33: warning: cast from
> pointer to integer of different size [-Wpointer-to-int-cast]
> #define ICE_FLOW_ENTRY_HNDL(e) ((u64)e)
> ^
> drivers/net/ethernet/intel/ice/ice_flow.c:946:13: note: in expansion
> of macro 'ICE_FLOW_ENTRY_HNDL'
> *entry_h = ICE_FLOW_ENTRY_HNDL(e);
> ^
>
> 2 warnings generated
>
> Signed-off-by: Pujin Shi <shipujin.t@xxxxxxxxx>

Thanks for the patch Pujin, however, Bixuan Cui has already submitted a
patch to resolve this issue [1].

[1]
https://patchwork.ozlabs.org/project/intel-wired-lan/patch/85dcea48-8b82-d806-0026-e6b371e6a092@xxxxxxxxxx/

Thanks,
Tony