All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tariq Toukan <ttoukan.linux@gmail.com>
To: Arnd Bergmann <arnd@kernel.org>,
	linux-kernel@vger.kernel.org, Saeed Mahameed <saeedm@nvidia.com>,
	Leon Romanovsky <leon@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Nathan Chancellor <nathan@kernel.org>,
	Jonathan Lemon <jonathan.lemon@gmail.com>,
	Maxim Mikityanskiy <maxtram95@gmail.com>,
	Daniel Borkmann <daniel@iogearbox.net>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Bill Wendling <morbo@google.com>,
	Justin Stitt <justinstitt@google.com>,
	Gal Pressman <gal@nvidia.com>,
	netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
	llvm@lists.linux.dev, Tariq Toukan <tariqt@nvidia.com>
Subject: Re: [PATCH 8/9] mlx5: stop warning for 64KB pages
Date: Fri, 29 Mar 2024 00:39:23 +0200	[thread overview]
Message-ID: <d8381c87-6123-4df0-97d3-ea8d0e17c6bb@gmail.com> (raw)
In-Reply-To: <20240328143051.1069575-9-arnd@kernel.org>



On 28/03/2024 16:30, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> When building with 64KB pages, clang points out that xsk->chunk_size
> can never be PAGE_SIZE:
> 
> drivers/net/ethernet/mellanox/mlx5/core/en/xsk/setup.c:19:22: error: result of comparison of constant 65536 with expression of type 'u16' (aka 'unsigned short') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
>          if (xsk->chunk_size > PAGE_SIZE ||
>              ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~
> 
> In older versions of this code, using PAGE_SIZE was the only
> possibility, so this would have never worked on 64KB page kernels,
> but the patch apparently did not address this case completely.
> 
> As Maxim Mikityanskiy suggested, 64KB chunks are really not all that
> useful, so just shut up the warning by adding a cast.
> 
> Fixes: 282c0c798f8e ("net/mlx5e: Allow XSK frames smaller than a page")
> Link: https://lore.kernel.org/netdev/20211013150232.2942146-1-arnd@kernel.org/
> Link: https://lore.kernel.org/lkml/a7b27541-0ebb-4f2d-bd06-270a4d404613@app.fastmail.com/
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Thanks for your patch.

Reviewed-by: Tariq Toukan <tariqt@nvidia.com>


  parent reply	other threads:[~2024-03-28 22:39 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-28 14:30 [PATCH 0/9] address remaining -Wtautological-constant-out-of-range-compare Arnd Bergmann
2024-03-28 14:30 ` [PATCH 1/9] dm integrity: fix out-of-range warning Arnd Bergmann
2024-03-28 18:36   ` Mikulas Patocka
2024-03-28 21:58   ` Justin Stitt
2024-03-28 14:30 ` [PATCH 2/9] libceph: avoid clang " Arnd Bergmann
2024-03-28 22:53   ` Justin Stitt
2024-03-29  0:06   ` Xiubo Li
2024-03-28 14:30 ` [PATCH 3/9] rbd: avoid " Arnd Bergmann
2024-03-28 14:53   ` Alex Elder
2024-03-29  0:05     ` Xiubo Li
2024-03-28 14:30 ` [PATCH 4/9] kcov: avoid clang " Arnd Bergmann
2024-03-28 22:22   ` Justin Stitt
2024-03-28 14:30 ` [PATCH 5/9] ipv4: tcp_output: avoid warning about NET_ADD_STATS Arnd Bergmann
2024-03-28 14:38   ` Eric Dumazet
2024-03-28 16:39     ` Arnd Bergmann
2024-03-28 14:30 ` [PATCH 6/9] nilfs2: fix out-of-range warning Arnd Bergmann
2024-03-28 15:21   ` Philipp Stanner
2024-03-28 16:12     ` Arnd Bergmann
2024-03-28 22:04   ` Justin Stitt
2024-03-28 22:25     ` Arnd Bergmann
2024-03-29  9:20   ` Ryusuke Konishi
2024-04-01  8:50   ` (subset) " Christian Brauner
2024-03-28 14:30 ` [PATCH 7/9] infiniband: uverbs: avoid out-of-range warnings Arnd Bergmann
2024-03-28 22:12   ` Justin Stitt
2024-04-03 15:45   ` Jason Gunthorpe
2024-04-03 20:16     ` Arnd Bergmann
2024-03-28 14:30 ` [PATCH 8/9] mlx5: stop warning for 64KB pages Arnd Bergmann
2024-03-28 15:37   ` Maxim Mikityanskiy
2024-03-28 22:09   ` Justin Stitt
2024-03-28 22:21     ` Arnd Bergmann
2024-03-28 22:39   ` Tariq Toukan [this message]
2024-03-28 14:30 ` [PATCH 9/9] kbuild: enable tautological-constant-out-of-range-compare Arnd Bergmann
2024-03-29 20:00 ` [PATCH 0/9] address remaining -Wtautological-constant-out-of-range-compare patchwork-bot+netdevbpf

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=d8381c87-6123-4df0-97d3-ea8d0e17c6bb@gmail.com \
    --to=ttoukan.linux@gmail.com \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gal@nvidia.com \
    --cc=jonathan.lemon@gmail.com \
    --cc=justinstitt@google.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=maxtram95@gmail.com \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=saeedm@nvidia.com \
    --cc=tariqt@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.