Re: [PATCH] bcm/CmHost.c: Fix noisy compile warnings

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

 



On Wed, 2014-10-15 at 05:26 -0700, Jeff Kirsher wrote:
> The Beceem WIMAX was generating compile warnings on 64bit machines,
> which were:
> 
> drivers/staging/bcm/CmHost.c: In function ‘StoreCmControlResponseMessage’:
> drivers/staging/bcm/CmHost.c:1503:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>    (struct bcm_connect_mgr_params *) ntohl(
>    ^
[]
> diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c
[]
> @@ -1499,9 +1499,15 @@ ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *Adapter,
>  	}
>  
>  	/* this can't possibly be right */
> +#ifdef CONFIG_32BIT
>  	pstAddIndication->psfAuthorizedSet =
>  		(struct bcm_connect_mgr_params *) ntohl(
>  				(ULONG)pstAddIndication->psfAuthorizedSet);
> +#else
> +	pstAddIndication->psfAuthorizedSet =
> +		(struct bcm_connect_mgr_params *)(u64)ntohl(
> +				(ULONG)pstAddIndication->psfAuthorizedSet);
> +#endif

no ifdefs necessary

(void *)(unsigned long)


_______________________________________________
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