Re: [patch] mtd: nand: silence some shift wrap warnings

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

 



On 08/12/2013 11:35 PM, Dan Carpenter wrote:
On Tue, Aug 13, 2013 at 02:23:02PM +0800, Huang Shijie wrote:
于 2013年08月09日 17:49, Dan Carpenter 写道:
There are static checkers which complain when we declare variables as

could you tell me which "checker" and how do you test it?

you'd better post the warning message here.


It's some stuff I'm working on but haven't released yet.  But "len"

Which static checker isn't all that important, so no worries. The patch can stand on its own merits.

and "ofs" are declared as u64 and loff_t.  If they were declared as
unsigned long then maybe the current code would be fine because the
code would be correct-ish on 32 bit arches.

IIUC, it's still correct, since we surely will never have an eraseblock size near 4GB (i.e., if the shift is ever larger than 31, we have a bug somewhere else).

So this is definitely the right thing to do.

As far as types are concerned, yes, this is still the right thing to do.

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



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux