Re: [PATCH 28/28] staging: wilc1000: change data type of variable

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

 



On Fri, Jul 31, 2015 at 04:38:36PM +0900, Tony Cho wrote:
> From: glen lee <glen.lee@xxxxxxxxx>
> 
> drvHandler of u32 type is used to handle integer type pointer operation which
> cause build warnings.
> To use integer type varialbe as pointer, drvHandler data type need to be changed
> with uintptr_t type.
> 
> drivers/staging/wilc1000/host_interface.c: In function ‘NetworkInfoReceived’:
> drivers/staging/wilc1000/host_interface.c:6767:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>   pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
>                ^
> drivers/staging/wilc1000/host_interface.c: In function ‘GnrlAsyncInfoReceived’:
> drivers/staging/wilc1000/host_interface.c:6819:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>   pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
>                ^
> drivers/staging/wilc1000/host_interface.c: In function ‘host_int_ScanCompleteReceived’:
> drivers/staging/wilc1000/host_interface.c:6878:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>   pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
> 
> Signed-off-by: glen lee <glen.lee@xxxxxxxxx>
> Signed-off-by: Tony Cho <tony.cho@xxxxxxxxx>
> ---
>  drivers/staging/wilc1000/host_interface.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
> index b36f98c..668e47e 100644
> --- a/drivers/staging/wilc1000/host_interface.c
> +++ b/drivers/staging/wilc1000/host_interface.c
> @@ -6760,7 +6760,7 @@ void NetworkInfoReceived(u8 *pu8Buffer, u32 u32Length)
>  {
>  	s32 s32Error = WILC_SUCCESS;
>  	tstrHostIFmsg strHostIFmsg;
> -	u32 drvHandler;
> +	uintptr_t drvHandler;

This isn't a valid kernel type, use "unsigned int *" if that is what you mean.

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux