From: Leon Romanovsky <leon@kernel.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-kernel@vger.kernel.org, Doug Ledford <dledford@redhat.com>,
Sean Hefty <sean.hefty@intel.com>,
Hal Rosenstock <hal.rosenstock@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Tejun Heo <tj@kernel.org>, Guenter Roeck <linux@roeck-us.net>,
linux-ide@vger.kernel.org, linux-media@vger.kernel.org,
akpm@linux-foundation.org, dri-devel@lists.freedesktop.org,
Matan Barak <matanb@mellanox.com>,
Yishai Hadas <yishaih@mellanox.com>,
linux-rdma@vger.kernel.org
Subject: Re: [PATCH 11/14] IB/uverbs: fix gcc-7 type warning
Date: Fri, 14 Jul 2017 12:46:31 +0300 [thread overview]
Message-ID: <20170714094631.GX1528@mtr-leonro.local> (raw)
In-Reply-To: <20170714093129.1366900-2-arnd@arndb.de>
[-- Attachment #1: Type: text/plain, Size: 1217 bytes --]
On Fri, Jul 14, 2017 at 11:31:04AM +0200, Arnd Bergmann wrote:
> When using ccache, 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 changes the macro to explicitly check the number for a positive
> length, which avoids the warning.
>
> Fixes: a96e4e2ffe43 ("IB/uverbs: New macro to set pointers to NULL if length is 0 in INIT_UDATA()")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/infiniband/core/uverbs.h | 14 ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)
>
Thanks,
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2017-07-14 9:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170714092540.1217397-1-arnd@arndb.de>
2017-07-14 9:31 ` [PATCH 11/14] IB/uverbs: fix gcc-7 type warning Arnd Bergmann
2017-07-14 9:46 ` Leon Romanovsky [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170714094631.GX1528@mtr-leonro.local \
--to=leon@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=dledford@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=hal.rosenstock@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=matanb@mellanox.com \
--cc=sean.hefty@intel.com \
--cc=tj@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=yishaih@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox