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

Jeff Kirsher jeffrey.t.kirsher at intel.com
Wed Oct 15 13:03:33 UTC 2014


On Wed, 2014-10-15 at 15:59 +0300, Dan Carpenter wrote:
> Or we could fix it but add a multi-line comment with lots of capital
> letters and exclamation marks.  I guess we would need to make a
> function
> since this cast is in several places.
> 
> void *silence_buggy_casting(u32 pointer)
> {
>         /*
>          * DANGER! DANGER! DANGER! DANGER! DANGER! DANGER! DANGER!
>          * FIXME!!!  We know this cast is totally buggy.  The BCM
> driver
>          * doesn't work on 64 bits.  But no one knows how to make this
>          * work.  Oh well.  Let's silence the GCC warning.
>          * DANGER! DANGER! DANGER! DANGER! DANGER! DANGER! DANGER!
>          *
>          */
>         return (void *)(long)pointer;
> }
> 
> Something really ugly and gnarly like that would be hard to ignore.

I thought I remember Greg saying something about getting rid of this
driver anyway, but I could be wrong.  If Greg decides to keep this
driver around, then I think we should something like your suggestion
above.
-------------- 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/73c3638e/attachment.asc>


More information about the devel mailing list