All of lore.kernel.org
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeed@kernel.org>
To: Nathan Chancellor <nathan@kernel.org>,
	Leon Romanovsky <leon@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>,
	netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
	linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com
Subject: Re: [PATCH net-next] net/mlx5: Use cpumask_available() in mlx5_eq_create_generic()
Date: Tue, 22 Jun 2021 14:39:02 -0700	[thread overview]
Message-ID: <d9121e8bf73c5d89f70dbce8e47e0bccff3d0cb8.camel@kernel.org> (raw)
In-Reply-To: <20210618000358.2402567-1-nathan@kernel.org>

On Thu, 2021-06-17 at 17:03 -0700, Nathan Chancellor wrote:
> When CONFIG_CPUMASK_OFFSTACK is unset, cpumask_var_t is not a pointer
> but a single element array, meaning its address in a structure cannot
> be
> NULL as long as it is not the first element, which it is not. This
> results in a clang warning:
> 
> drivers/net/ethernet/mellanox/mlx5/core/eq.c:715:14: warning: address
> of
> array 'param->affinity' will always evaluate to 'true'
> [-Wpointer-bool-conversion]
>         if (!param->affinity)
>             ~~~~~~~~^~~~~~~~
> 1 warning generated.
> 
> The helper cpumask_available was added in commit f7e30f01a9e2
> ("cpumask:
> Add helper cpumask_available()") to handle situations like this so use
> it to keep the meaning of the code the same while resolving the
> warning.
> 
> Fixes: e4e3f24b822f ("net/mlx5: Provide cpumask at EQ creation phase")
> Link: https://github.com/ClangBuiltLinux/linux/issues/1400
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---

Applied to net-next-mlx5
Thanks!


      parent reply	other threads:[~2021-06-22 21:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-18  0:03 [PATCH net-next] net/mlx5: Use cpumask_available() in mlx5_eq_create_generic() Nathan Chancellor
2021-06-21  8:53 ` Leon Romanovsky
2021-06-22 21:39 ` Saeed Mahameed [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=d9121e8bf73c5d89f70dbce8e47e0bccff3d0cb8.camel@kernel.org \
    --to=saeed@kernel.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=netdev@vger.kernel.org \
    /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.