From: Saeed Mahameed <saeedm@mellanox.com>
To: "natechancellor@gmail.com" <natechancellor@gmail.com>,
"leon@kernel.org" <leon@kernel.org>
Cc: "clang-built-linux@googlegroups.com"
<clang-built-linux@googlegroups.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mlx5: Remove uninitialized use of key in mlx5_core_create_mkey
Date: Tue, 17 Mar 2020 06:36:51 +0000 [thread overview]
Message-ID: <1639b8bff62218c8a931ee48e01710f921bf9666.camel@mellanox.com> (raw)
In-Reply-To: <20200316203452.32998-1-natechancellor@gmail.com>
On Mon, 2020-03-16 at 13:34 -0700, Nathan Chancellor wrote:
> Clang warns:
>
> ../drivers/net/ethernet/mellanox/mlx5/core/mr.c:63:21: warning:
> variable
> 'key' is uninitialized when used here [-Wuninitialized]
> mkey_index, key, mkey->key);
> ^~~
> ../drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h:54:6: note:
> expanded from macro 'mlx5_core_dbg'
> ##__VA_ARGS__)
> ^~~~~~~~~~~
> ../include/linux/dev_printk.h:114:39: note: expanded from macro
> 'dev_dbg'
> dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
> ^~~~~~~~~~~
> ../include/linux/dynamic_debug.h:158:19: note: expanded from macro
> 'dynamic_dev_dbg'
> dev, fmt, ##__VA_ARGS__)
> ^~~~~~~~~~~
> ../include/linux/dynamic_debug.h:143:56: note: expanded from macro
> '_dynamic_func_call'
> __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func,
> ##__VA_ARGS__)
> ^~~~~~~
> ~~~~
> ../include/linux/dynamic_debug.h:125:15: note: expanded from macro
> '__dynamic_func_call'
> func(&id, ##__VA_ARGS__); \
> ^~~~~~~~~~~
> ../drivers/net/ethernet/mellanox/mlx5/core/mr.c:47:8: note:
> initialize
> the variable 'key' to silence this warning
> u8 key;
> ^
> = '\0'
> 1 warning generated.
>
> key's initialization was removed in commit fc6a9f86f08a
> ("{IB,net}/mlx5:
> Assign mkey variant in mlx5_ib only") but its use was not fully
> removed.
> Remove it now so that there is no more warning.
>
> Fixes: fc6a9f86f08a ("{IB,net}/mlx5: Assign mkey variant in mlx5_ib
> only")
> Link: https://github.com/ClangBuiltLinux/linux/issues/932
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
>
LGTM
applied to mlx5-next
Thanks,
Saeed.
prev parent reply other threads:[~2020-03-17 6:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-16 20:34 Nathan Chancellor
2020-03-16 20:55 ` Nick Desaulniers
2020-03-17 6:36 ` 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=1639b8bff62218c8a931ee48e01710f921bf9666.camel@mellanox.com \
--to=saeedm@mellanox.com \
--cc=clang-built-linux@googlegroups.com \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=natechancellor@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®