From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754774AbcFPVY1 (ORCPT ); Thu, 16 Jun 2016 17:24:27 -0400 Received: from shards.monkeyblade.net ([149.20.54.216]:43251 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753900AbcFPVY0 (ORCPT ); Thu, 16 Jun 2016 17:24:26 -0400 Date: Thu, 16 Jun 2016 14:24:24 -0700 (PDT) Message-Id: <20160616.142424.302149364592568497.davem@davemloft.net> To: arnd@arndb.de Cc: linux-net-drivers@solarflare.com, ecree@solarflare.com, bkenward@solarflare.com, mhabets@solarflare.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: sfc: avoid -Wtype-limits warning From: David Miller In-Reply-To: <20160615203122.3574513-1-arnd@arndb.de> References: <20160615203122.3574513-1-arnd@arndb.de> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 16 Jun 2016 14:24:25 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann 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 Applied, thanks.