Re: New bcache compiler warning (was: Re: bcache: Minor fixes from kbuild robot)

From: Kent Overstreet
Date: Mon Feb 17 2014 - 17:46:58 EST


On Mon, Feb 17, 2014 at 02:44:47PM -0800, Randy Dunlap wrote:
> Could that cause a truncation? unsigned means unsigned int.
> Can unsigned int be smaller (fewer bits) than the k pointer?
> If so, is that OK or a problem?

It's just truncating the offset of the pointer within the struct bset, which is
part of a btree node - the thing that's being cast is restricted to be no bigger
than a btree node, which is at most a few mb.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/