From: Jason Gunthorpe <jgg@nvidia.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Doug Ledford <dledford@redhat.com>,
Leon Romanovsky <leonro@nvidia.com>,
kernel test robot <lkp@intel.com>,
linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org
Subject: Re: [PATCH rdma-rc] RDMA/netlink: Annotate unused function that is needed for compilation check
Date: Mon, 8 Nov 2021 08:36:39 -0400 [thread overview]
Message-ID: <20211108123639.GT2744544@nvidia.com> (raw)
In-Reply-To: <4a8101919b765e01d7fde6f27fd572c958deeb4a.1636267207.git.leonro@nvidia.com>
On Sun, Nov 07, 2021 at 08:40:47AM +0200, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@nvidia.com>
>
> >> drivers/infiniband/core/nldev.c:2543:1: warning: unused function '__chk_RDMA_NL_NLDEV'
> MODULE_ALIAS_RDMA_NETLINK(RDMA_NL_NLDEV, 5);
> ^
>
> Fixes: e3bf14bdc17a ("rdma: Autoload netlink client modules")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> ---
> include/rdma/rdma_netlink.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/rdma/rdma_netlink.h b/include/rdma/rdma_netlink.h
> index 2758d9df71ee..c2a79aeee113 100644
> --- a/include/rdma/rdma_netlink.h
> +++ b/include/rdma/rdma_netlink.h
> @@ -30,7 +30,7 @@ enum rdma_nl_flags {
> * constant as well and the compiler checks they are the same.
> */
> #define MODULE_ALIAS_RDMA_NETLINK(_index, _val) \
> - static inline void __chk_##_index(void) \
> + static inline void __maybe_unused __chk_##_index(void) \
> { \
> BUILD_BUG_ON(_index != _val); \
> } \
This is a compiler bug, static inline should never need maybe_unsed
Jason
next prev parent reply other threads:[~2021-11-08 12:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-07 6:40 [PATCH rdma-rc] RDMA/netlink: Annotate unused function that is needed for compilation check Leon Romanovsky
2021-11-08 12:36 ` Jason Gunthorpe [this message]
2021-11-08 12:47 ` Leon Romanovsky
2021-11-08 12:48 ` Jason Gunthorpe
2021-11-10 14:20 ` Leon Romanovsky
2021-11-10 14:42 ` Jason Gunthorpe
2021-11-10 14:52 ` Leon Romanovsky
2021-11-10 14:54 ` Jason Gunthorpe
2021-11-10 15:02 ` Leon Romanovsky
2021-11-16 17:52 ` Jason Gunthorpe
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=20211108123639.GT2744544@nvidia.com \
--to=jgg@nvidia.com \
--cc=dledford@redhat.com \
--cc=leon@kernel.org \
--cc=leonro@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=lkp@intel.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;
as well as URLs for NNTP newsgroup(s).