Re: [patch 2/6] drivers/scsi/megaraid.c: fix sparse warnings

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

 



On Tue, 10 Jan 2012 20:25:38 -0500 James Bottomley <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx> wrote:

> > Since I have no HP firmware on one of these boards, and I can see that
> > altering the firmware string will alter the behvior of the above code
> > WRT setting/clearing BOARD_64BIT in the adapter->flag field, I have to
> > NACK this patch.  I hope we can live with the sparse warning since I
> > have no way to test this.
> 
> So I think the title of the patch is misleading.

"fix sparse warning" is almost always a bad or wrong patch title.

Sparse warns about "X", and what we're fixing is "X", not the warning.

>  The point is that 
> 
> adapter->product_info.fw_version[] >> 8
> 
> Always produces zero since adapter->product_info.fw_version is a char[].
> It seems that the idea was 
> 
> If you want to supply an update that just making the zero explicit for
> the firmware version (and thus fixes the sparse warning) is fine too ...
> Al just thought that you meant to take the firmware version as BCD
> nybbles.

Yes, it sounds like this is a day-one bug which we can't really fix
now, with an acceptable level of effort or risk.  I agree that replacing
it with literal zero and a decent code comment is appropriate.

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux