lkml.org 
[lkml]   [2014]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] bcm/CmHost.c: Fix noisy compile warnings
From
Date
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)


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2014-10-15 15:01    [W:0.056 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site