Re: [PATCH 21/21] advansys: Changes to work on parisc

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

 



On Fri, 5 Oct 2007 13:34:50 -0600
Matthew Wilcox <matthew@xxxxxx> wrote:

> On Fri, Oct 05, 2007 at 12:03:55PM -0700, Andrew Morton wrote:
> > This isn't right.  resource_size_t can be 64-bit so should be cast to
> > unsigned long long and printed with %llx.
> 
> But it's a 32-bit BAR.

Which gets stored in a 64-bit variable.

> > If it is known that this driver will never encounter a 64-bit address here
> > then this optimisation should be accompanied by a comment at every place
> > where it is employed so that people do not copy the wrong code into other
> > drivers.
> 
> Tell you what, I'll fix it properly when we have a better solution than
> 'cast resource_size_t to long long for printing'.

The code is wrong, that's all.  If people copy it, their printks will print
incorrect (ie: truncated) information on some platforms.

As I said, if the code is knowingly wrong then there should be a cautionary
comment at each known-to-be-wrong site.

-
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