Re: [PATCH] staging: bcm: fix pointer-integer size mismatch warnings

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

 



On Tue, Feb 04, 2014 at 05:26:57PM +0900, SeongJae Park wrote:
> Hello,
> 
> On Tue, Feb 4, 2014 at 5:21 PM, Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
> > On Tue, Feb 04, 2014 at 03:59:23PM +0900, SeongJae Park wrote:
> >> Fix the pointer-integer size mismatch warnings below:
> >>       drivers/staging/bcm/CmHost.c: In function ‘StoreCmControlResponseMessage’:
> >>       drivers/staging/bcm/CmHost.c:1387:39: warning: cast to pointer from
> >>                       integer of different size [-Wint-to-pointer-cast]
> >>         pstAddIndication->psfAuthorizedSet = (struct bcm_connect_mgr_params *)ntohl((ULONG)pstAddIndication->psfAuthorizedSet);
> >>                                              ^
> >>       drivers/staging/bcm/CmHost.c:1426:37: warning: cast to pointer from
> >>                       integer of different size [-Wint-to-pointer-cast]
> >>         pstAddIndication->psfAdmittedSet = (struct bcm_connect_mgr_params *)ntohl((ULONG)pstAddIndication->psfAdmittedSet);
> >>                                            ^
> >>       drivers/staging/bcm/CmHost.c:1440:35: warning: cast to pointer from
> >>                       integer of different size [-Wint-to-pointer-cast]
> >>         pstAddIndication->psfActiveSet = (struct bcm_connect_mgr_params *)ntohl((ULONG)pstAddIndication->psfActiveSet);
> >>                                          ^
> >
> > No.  You haven't fixed the bug, you've just silenced the warning so now
> > someone has to spent hours and hours looking for it when it comes time
> > to write a proper fix.  Don't do that.
> >
> 
> I had thought silencing warning may be better in someway for some people.
> But, anyway, now I agree and respect your opinion. Thank you for the opinion :)

Don't worry about it.  You're not the first person to try submit that
patch.

When I last looked at it, this driver only worked under 32 bits and
there were other 64 bit bugs as well besides this one.

regards,
dan carpenter

_______________________________________________
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