lkml.org 
[lkml]   [2016]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] net: sfc: avoid -Wtype-limits warning
From
From: Arnd Bergmann <arnd@arndb.de>
Date: Wed, 15 Jun 2016 22:31:10 +0200

> 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: Arnd Bergmann <arnd@arndb.de>

Applied, thanks.

\
 
 \ /
  Last update: 2016-06-17 00:01    [W:0.064 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site