• Arnd Bergmann's avatar
    net: sfc: avoid -Wtype-limits warning · 17471c7b
    Arnd Bergmann authored
    When building with -Wextra, we get a harmless warning from the
    EFX_EXTRACT_OWORD32 macro:
    
    ethernet/sfc/farch.c: In function 'efx_farch_test_registers':
    ethernet/sfc/farch.c:119:30: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]
    ethernet/sfc/farch.c:124:144: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]
    ethernet/sfc/farch.c:124:392: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]
    ethernet/sfc/farch.c:124:731: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]
    
    The macro and the caller are both correct, but we can avoid the
    warning by changing the index variable to a signed type.
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Acked-by: default avatarBert Kenward <bkenward@solarflare.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    17471c7b
farch.c 88 KB