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

Jeff Kirsher jeffrey.t.kirsher at intel.com
Wed Oct 15 22:59:21 UTC 2014


On Wed, 2014-10-15 at 12:01 -0700, Jeff Kirsher wrote:
> From: Fabio Estevam <fabio.estevam at freescale.com>
> 
> 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(
>    ^
> drivers/staging/bcm/CmHost.c:1546:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>    (struct bcm_connect_mgr_params *) ntohl(
>    ^
> drivers/staging/bcm/CmHost.c:1564:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>    (struct bcm_connect_mgr_params *) ntohl(
> 
> This resolves the issue by preventing the driver to compile if CONFIG_64BIT
> is enabled, since the driver is known to be broken for 64 bit arch's.
> 
> CC: Dan Carpenter <dan.carpenter at oracle.com>
> CC: Joe Perches <joe at perches.com>
> Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher at intel.com>

Greg- I have also submitted a patch to remove this driver entirely.  So
if you choose to apply the patch to remove the driver, then you can
disregard this patch.

> ---
> v2: change fix from using typecast u64 in the code to altering Kconfig to
>     prevent the driver from compiling on 64 bit arch's based on feedback
> 
>  drivers/staging/bcm/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/bcm/Kconfig b/drivers/staging/bcm/Kconfig
> index 8acf4b2..273b328 100644
> --- a/drivers/staging/bcm/Kconfig
> +++ b/drivers/staging/bcm/Kconfig
> @@ -1,6 +1,6 @@
>  config BCM_WIMAX
>         tristate "Beceem BCS200/BCS220-3 and BCSM250 wimax support"
> -       depends on USB && NET
> +       depends on USB && NET && !64BIT
>         help
>           This is an experimental driver for the Beceem WIMAX chipset used
>  	 by Sprint 4G.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/attachments/20141015/5aeca2ab/attachment.asc>


More information about the devel mailing list