From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752603AbdI0NJr (ORCPT ); Wed, 27 Sep 2017 09:09:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44960 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751959AbdI0NJq (ORCPT ); Wed, 27 Sep 2017 09:09:46 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 8E96B81E09 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=dledford@redhat.com Message-ID: <1506517782.82712.7.camel@redhat.com> Subject: Re: [PATCH 1/2] [v2] IB/uverbs: clean up INIT_UDATA_BUF_OR_NULL usage From: Doug Ledford To: Arnd Bergmann , Sean Hefty , Hal Rosenstock Cc: Christoph Hellwig , Matan Barak , Yishai Hadas , Leon Romanovsky , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 27 Sep 2017 09:09:42 -0400 In-Reply-To: <20170906213521.1845893-1-arnd@arndb.de> References: <20170906213521.1845893-1-arnd@arndb.de> Organization: Red Hat, Inc. Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 27 Sep 2017 13:09:46 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2017-09-06 at 23:34 +0200, Arnd Bergmann wrote: > We get a harmless warning about the fact that we use the result of a > multiplication as a condition: > > drivers/infiniband/core/uverbs_main.c: In function 'ib_uverbs_write': > drivers/infiniband/core/uverbs_main.c:787:40: error: '*' in boolean > context, suggest '&&' instead [-Werror=int-in-bool-context] > drivers/infiniband/core/uverbs_main.c:787:117: error: '*' in boolean > context, suggest '&&' instead [-Werror=int-in-bool-context] > drivers/infiniband/core/uverbs_main.c:790:50: error: '*' in boolean > context, suggest '&&' instead [-Werror=int-in-bool-context] > drivers/infiniband/core/uverbs_main.c:790:151: error: '*' in boolean > context, suggest '&&' instead [-Werror=int-in-bool-context] > > This avoids the problem by using an inline function in place of > the macro. > > Fixes: a96e4e2ffe43 ("IB/uverbs: New macro to set pointers to NULL if > length is 0 in INIT_UDATA()") > Suggested-by: Christoph Hellwig > Link: https://patchwork.kernel.org/patch/9940777/ > Signed-off-by: Arnd Bergmann Thanks, applied. -- Doug Ledford GPG KeyID: B826A3330E572FDD Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD