From: Olof Johansson <[EMAIL PROTECTED]> Date: Sat, 20 Oct 2007 14:33:57 -0500
> PAGE_SIZE in this case is 64KB, so I don't quite get why gcc can't tell > that the line in question will never be reached. GCC does not do that kind of full flow analysis based upon constant expression simplification to determine if a store like this into a type smaller than the constant value can handle can actually occur. > I suggest the following instead, but I can unfortunately not do anything but > build test it. > > Also, the driver does some other checks to make sure that PAGE_SIZE is a > power of two (BUILD_BUG_ON() in niu_init()), doesn't seem like that could > ever be untrue? Or are there really archs with non-power-of-two PAGE_SIZE? It was just overly-anal assertion checking. I tend to prefer using code instead of comments to describe invariants, but this one is pretty unrealistic and silly. > Signed-off-by: Olof Johansson <[EMAIL PROTECTED]> > > -- > > Ack! It should obviously use min(), not max()! :-) Applied, thanks! - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html