linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] bcm/CmHost.c: Fix noisy compile warnings
@ 2014-10-15 19:01 Jeff Kirsher
  2014-10-15 19:55 ` Dan Carpenter
  2014-10-15 22:59 ` Jeff Kirsher
  0 siblings, 2 replies; 8+ messages in thread
From: Jeff Kirsher @ 2014-10-15 19:01 UTC (permalink / raw)
  To: gregkh
  Cc: Fabio Estevam, linux-kernel, mail, devel, Dan Carpenter,
	Joe Perches, Jeff Kirsher

From: Fabio Estevam <fabio.estevam@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@oracle.com>
CC: Joe Perches <joe@perches.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
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.
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] bcm/CmHost.c: Fix noisy compile warnings
  2014-10-15 19:01 [PATCH v2] bcm/CmHost.c: Fix noisy compile warnings Jeff Kirsher
@ 2014-10-15 19:55 ` Dan Carpenter
  2014-10-15 20:26   ` Jeff Kirsher
  2014-10-15 22:59 ` Jeff Kirsher
  1 sibling, 1 reply; 8+ messages in thread
From: Dan Carpenter @ 2014-10-15 19:55 UTC (permalink / raw)
  To: Jeff Kirsher
  Cc: gregkh, Fabio Estevam, linux-kernel, mail, devel, Joe Perches

On Wed, Oct 15, 2014 at 12:01:41PM -0700, Jeff Kirsher wrote:
> From: Fabio Estevam <fabio.estevam@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.
> 

Oops.  Someone turned a Joe patch into a real patch.  Please enable
COMPILE_TEST for this.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] bcm/CmHost.c: Fix noisy compile warnings
  2014-10-15 19:55 ` Dan Carpenter
@ 2014-10-15 20:26   ` Jeff Kirsher
  2014-10-16  7:52     ` Dan Carpenter
  0 siblings, 1 reply; 8+ messages in thread
From: Jeff Kirsher @ 2014-10-15 20:26 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: gregkh, Fabio Estevam, linux-kernel, mail, devel, Joe Perches

[-- Attachment #1: Type: text/plain, Size: 1278 bytes --]

On Wed, 2014-10-15 at 22:55 +0300, Dan Carpenter wrote:
> On Wed, Oct 15, 2014 at 12:01:41PM -0700, Jeff Kirsher wrote:
> > From: Fabio Estevam <fabio.estevam@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.
> > 
> 
> Oops.  Someone turned a Joe patch into a real patch.  Please enable
> COMPILE_TEST for this.

I agree with Joe, that COMPILE_TEST is not useful for this driver.

> 
> regards,
> dan carpenter
> 



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] bcm/CmHost.c: Fix noisy compile warnings
  2014-10-15 19:01 [PATCH v2] bcm/CmHost.c: Fix noisy compile warnings Jeff Kirsher
  2014-10-15 19:55 ` Dan Carpenter
@ 2014-10-15 22:59 ` Jeff Kirsher
  2014-10-16  8:13   ` Greg KH
  1 sibling, 1 reply; 8+ messages in thread
From: Jeff Kirsher @ 2014-10-15 22:59 UTC (permalink / raw)
  To: gregkh
  Cc: Fabio Estevam, linux-kernel, mail, devel, Dan Carpenter, Joe Perches

[-- Attachment #1: Type: text/plain, Size: 2082 bytes --]

On Wed, 2014-10-15 at 12:01 -0700, Jeff Kirsher wrote:
> From: Fabio Estevam <fabio.estevam@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@oracle.com>
> CC: Joe Perches <joe@perches.com>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@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.



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] bcm/CmHost.c: Fix noisy compile warnings
  2014-10-15 20:26   ` Jeff Kirsher
@ 2014-10-16  7:52     ` Dan Carpenter
  2014-10-16  7:59       ` Jeff Kirsher
  0 siblings, 1 reply; 8+ messages in thread
From: Dan Carpenter @ 2014-10-16  7:52 UTC (permalink / raw)
  To: Jeff Kirsher; +Cc: Fabio Estevam, devel, gregkh, linux-kernel, Joe Perches

On Wed, Oct 15, 2014 at 01:26:07PM -0700, Jeff Kirsher wrote:
> On Wed, 2014-10-15 at 22:55 +0300, Dan Carpenter wrote:
> > On Wed, Oct 15, 2014 at 12:01:41PM -0700, Jeff Kirsher wrote:
> > > From: Fabio Estevam <fabio.estevam@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.
> > > 
> > 
> > Oops.  Someone turned a Joe patch into a real patch.  Please enable
> > COMPILE_TEST for this.
> 
> I agree with Joe, that COMPILE_TEST is not useful for this driver.

If we remove the driver fine, but if we keep the driver then we should
do enable any QA testing we can.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] bcm/CmHost.c: Fix noisy compile warnings
  2014-10-16  7:52     ` Dan Carpenter
@ 2014-10-16  7:59       ` Jeff Kirsher
  2014-10-16  8:09         ` Dan Carpenter
  0 siblings, 1 reply; 8+ messages in thread
From: Jeff Kirsher @ 2014-10-16  7:59 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Fabio Estevam, devel, gregkh, linux-kernel, Joe Perches

[-- Attachment #1: Type: text/plain, Size: 2144 bytes --]

On Thu, 2014-10-16 at 10:52 +0300, Dan Carpenter wrote:
> On Wed, Oct 15, 2014 at 01:26:07PM -0700, Jeff Kirsher wrote:
> > On Wed, 2014-10-15 at 22:55 +0300, Dan Carpenter wrote:
> > > On Wed, Oct 15, 2014 at 12:01:41PM -0700, Jeff Kirsher wrote:
> > > > From: Fabio Estevam <fabio.estevam@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.
> > > > 
> > > 
> > > Oops.  Someone turned a Joe patch into a real patch.  Please enable
> > > COMPILE_TEST for this.
> > 
> > I agree with Joe, that COMPILE_TEST is not useful for this driver.
> 
> If we remove the driver fine, but if we keep the driver then we should
> do enable any QA testing we can.

Sorry, after thinking about this more, I think that Joe and I jumped to
the conclusion that adding COMPILE_TEST meant to add " || COMPILE_TEST"
which would generate the same compile warnings we see now, especially
when doing allmodconfig.  But, if we added " && COMPILE_TEST", along
with the other Kconfig change, then I am fine with that.

So yes, I am on the same page with you.  If we end up keeping the
driver, then I will respin the patch to add && COMPILE_TEST.  I will
wait to re-spin based on whether Greg accepts the patch to remove the
driver or not.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] bcm/CmHost.c: Fix noisy compile warnings
  2014-10-16  7:59       ` Jeff Kirsher
@ 2014-10-16  8:09         ` Dan Carpenter
  0 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2014-10-16  8:09 UTC (permalink / raw)
  To: Jeff Kirsher; +Cc: Fabio Estevam, devel, gregkh, linux-kernel, Joe Perches

COMPILE_TEST is just so that you can view build warnings.  We would say:

depends on USB && NET && (!64BIT || COMPILE_TEST)

of

depends on USB && NET && (X86_32 || (X86 && COMPILE_TEST))

If you don't have USB or NET, you're get build errors but they don't
indicate bugs.  If you build on X86_64 the warnings are real bugs.

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] bcm/CmHost.c: Fix noisy compile warnings
  2014-10-15 22:59 ` Jeff Kirsher
@ 2014-10-16  8:13   ` Greg KH
  0 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2014-10-16  8:13 UTC (permalink / raw)
  To: Jeff Kirsher
  Cc: Fabio Estevam, devel, linux-kernel, Joe Perches, Dan Carpenter

On Wed, Oct 15, 2014 at 03:59:21PM -0700, Jeff Kirsher wrote:
> On Wed, 2014-10-15 at 12:01 -0700, Jeff Kirsher wrote:
> > From: Fabio Estevam <fabio.estevam@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@oracle.com>
> > CC: Joe Perches <joe@perches.com>
> > Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> > Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@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.

Thanks, I'll take that removal patch now, I'm glad to get rid of that
mess.

greg k-h

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-10-16  8:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-15 19:01 [PATCH v2] bcm/CmHost.c: Fix noisy compile warnings Jeff Kirsher
2014-10-15 19:55 ` Dan Carpenter
2014-10-15 20:26   ` Jeff Kirsher
2014-10-16  7:52     ` Dan Carpenter
2014-10-16  7:59       ` Jeff Kirsher
2014-10-16  8:09         ` Dan Carpenter
2014-10-15 22:59 ` Jeff Kirsher
2014-10-16  8:13   ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).