Skip to content
  • Olof Johansson's avatar
    [NIU]: Cleanup PAGE_SIZE checks a bit · 81429973
    Olof Johansson authored
    I get the following warning from a powerpc allyesconfig of current
    drivers/net/niu.c: In function 'niu_size_rbr':
    drivers/net/niu.c:3113: warning: large integer implicitly truncated to unsigned type
    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.
    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
    Signed-off-by: default avatarOlof Johansson <>
    Signed-off-by: default avatarDavid S. Miller <>