• Geert Uytterhoeven's avatar
    net: mac8390 - Sort out memory/MMIO accesses and casts · 7e364e96
    Geert Uytterhoeven authored
    commit 5c7fffd0 ("drivers/net/mac8390.c: Remove
    useless memcpy casting") removed too many casts, introducing the following
    warnings:
    
    | drivers/net/mac8390.c:248: warning: passing argument 1 of '__builtin_memcpy' makes pointer from integer without a cast
    | drivers/net/mac8390.c:253: warning: passing argument 1 of 'word_memcpy_tocard' makes pointer from integer without a cast
    | drivers/net/mac8390.c:255: warning: passing argument 2 of 'word_memcpy_fromcard' makes pointer from integer without a cast
    
    Instead of just readding the casts,
      - move all casts inside word_memcpy_{to,from}card(),
      - replace an incorrect memcpy() by memcpy_toio(),
      - add memcmp_withio() as a wrapper around memcmp(),
      - replace an incorrect memcpy_toio() by memcpy_fromio().
    Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
    Tested-by: default avatarFinn Thain <fthain@telegraphics.com.au>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    7e364e96
mac8390.c 23.2 KB