* [PATCH rdma-rc] RDMA/netlink: Annotate unused function that is needed for compilation check @ 2021-11-07 6:40 Leon Romanovsky 2021-11-08 12:36 ` Jason Gunthorpe 2021-11-16 17:52 ` Jason Gunthorpe 0 siblings, 2 replies; 10+ messages in thread From: Leon Romanovsky @ 2021-11-07 6:40 UTC (permalink / raw) To: Doug Ledford, Jason Gunthorpe Cc: Leon Romanovsky, kernel test robot, linux-kernel, linux-rdma 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); \ } \ -- 2.33.1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH rdma-rc] RDMA/netlink: Annotate unused function that is needed for compilation check 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 2021-11-08 12:47 ` Leon Romanovsky 2021-11-16 17:52 ` Jason Gunthorpe 1 sibling, 1 reply; 10+ messages in thread From: Jason Gunthorpe @ 2021-11-08 12:36 UTC (permalink / raw) To: Leon Romanovsky Cc: Doug Ledford, Leon Romanovsky, kernel test robot, linux-kernel, linux-rdma 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 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH rdma-rc] RDMA/netlink: Annotate unused function that is needed for compilation check 2021-11-08 12:36 ` Jason Gunthorpe @ 2021-11-08 12:47 ` Leon Romanovsky 2021-11-08 12:48 ` Jason Gunthorpe 0 siblings, 1 reply; 10+ messages in thread From: Leon Romanovsky @ 2021-11-08 12:47 UTC (permalink / raw) To: Jason Gunthorpe; +Cc: Doug Ledford, kernel test robot, linux-kernel, linux-rdma On Mon, Nov 08, 2021 at 08:36:39AM -0400, Jason Gunthorpe wrote: > 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 I saw many examples like this in arch code. For example, commit 4ac214574d2d ("KVM: MMU: mark role_regs and role accessors as maybe unused") It is better to fix and forget instead of trying to fix clang. Thanks > > Jason ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH rdma-rc] RDMA/netlink: Annotate unused function that is needed for compilation check 2021-11-08 12:47 ` Leon Romanovsky @ 2021-11-08 12:48 ` Jason Gunthorpe 2021-11-10 14:20 ` Leon Romanovsky 0 siblings, 1 reply; 10+ messages in thread From: Jason Gunthorpe @ 2021-11-08 12:48 UTC (permalink / raw) To: Leon Romanovsky; +Cc: Doug Ledford, kernel test robot, linux-kernel, linux-rdma On Mon, Nov 08, 2021 at 02:47:19PM +0200, Leon Romanovsky wrote: > On Mon, Nov 08, 2021 at 08:36:39AM -0400, Jason Gunthorpe wrote: > > 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 > > > +++ 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 > > I saw many examples like this in arch code. > For example, commit 4ac214574d2d ("KVM: MMU: mark role_regs and role accessors as maybe unused") > > It is better to fix and forget instead of trying to fix clang. "Because clang reports warnings for unused inlines declared in a .c file, mark both sets of accessors as __maybe_unused." Yikes, what a thing to do. Jason ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH rdma-rc] RDMA/netlink: Annotate unused function that is needed for compilation check 2021-11-08 12:48 ` Jason Gunthorpe @ 2021-11-10 14:20 ` Leon Romanovsky 2021-11-10 14:42 ` Jason Gunthorpe 0 siblings, 1 reply; 10+ messages in thread From: Leon Romanovsky @ 2021-11-10 14:20 UTC (permalink / raw) To: Jason Gunthorpe; +Cc: Doug Ledford, kernel test robot, linux-kernel, linux-rdma On Mon, Nov 08, 2021 at 08:48:39AM -0400, Jason Gunthorpe wrote: > On Mon, Nov 08, 2021 at 02:47:19PM +0200, Leon Romanovsky wrote: > > On Mon, Nov 08, 2021 at 08:36:39AM -0400, Jason Gunthorpe wrote: > > > 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 > > > > +++ 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 > > > > I saw many examples like this in arch code. > > For example, commit 4ac214574d2d ("KVM: MMU: mark role_regs and role accessors as maybe unused") > > > > It is better to fix and forget instead of trying to fix clang. > > "Because clang reports warnings for unused inlines declared in a .c file, > mark both sets of accessors as __maybe_unused." > > Yikes, what a thing to do. Jason, I don't see this patch in the tree and patchworks status says that it is "new". https://patchwork.kernel.org/project/linux-rdma/patch/4a8101919b765e01d7fde6f27fd572c958deeb4a.1636267207.git.leonro@nvidia.com/ Should I do anything extra to progress with this patch? Thanks > > Jason ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH rdma-rc] RDMA/netlink: Annotate unused function that is needed for compilation check 2021-11-10 14:20 ` Leon Romanovsky @ 2021-11-10 14:42 ` Jason Gunthorpe 2021-11-10 14:52 ` Leon Romanovsky 0 siblings, 1 reply; 10+ messages in thread From: Jason Gunthorpe @ 2021-11-10 14:42 UTC (permalink / raw) To: Leon Romanovsky; +Cc: Doug Ledford, kernel test robot, linux-kernel, linux-rdma On Wed, Nov 10, 2021 at 04:20:31PM +0200, Leon Romanovsky wrote: > On Mon, Nov 08, 2021 at 08:48:39AM -0400, Jason Gunthorpe wrote: > > On Mon, Nov 08, 2021 at 02:47:19PM +0200, Leon Romanovsky wrote: > > > On Mon, Nov 08, 2021 at 08:36:39AM -0400, Jason Gunthorpe wrote: > > > > 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 > > > > > +++ 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 > > > > > > I saw many examples like this in arch code. > > > For example, commit 4ac214574d2d ("KVM: MMU: mark role_regs and role accessors as maybe unused") > > > > > > It is better to fix and forget instead of trying to fix clang. > > > > "Because clang reports warnings for unused inlines declared in a .c file, > > mark both sets of accessors as __maybe_unused." > > > > Yikes, what a thing to do. > > Jason, > > I don't see this patch in the tree and patchworks status says that it is "new". > https://patchwork.kernel.org/project/linux-rdma/patch/4a8101919b765e01d7fde6f27fd572c958deeb4a.1636267207.git.leonro@nvidia.com/ > > Should I do anything extra to progress with this patch? It is merge window, I'm not doing anything with patches until rc1 unless it is an emergency and a random clang failure on mips isn't an emergency. Jason ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH rdma-rc] RDMA/netlink: Annotate unused function that is needed for compilation check 2021-11-10 14:42 ` Jason Gunthorpe @ 2021-11-10 14:52 ` Leon Romanovsky 2021-11-10 14:54 ` Jason Gunthorpe 0 siblings, 1 reply; 10+ messages in thread From: Leon Romanovsky @ 2021-11-10 14:52 UTC (permalink / raw) To: Jason Gunthorpe; +Cc: Doug Ledford, kernel test robot, linux-kernel, linux-rdma On Wed, Nov 10, 2021 at 10:42:44AM -0400, Jason Gunthorpe wrote: > On Wed, Nov 10, 2021 at 04:20:31PM +0200, Leon Romanovsky wrote: > > On Mon, Nov 08, 2021 at 08:48:39AM -0400, Jason Gunthorpe wrote: > > > On Mon, Nov 08, 2021 at 02:47:19PM +0200, Leon Romanovsky wrote: > > > > On Mon, Nov 08, 2021 at 08:36:39AM -0400, Jason Gunthorpe wrote: > > > > > 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 > > > > > > +++ 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 > > > > > > > > I saw many examples like this in arch code. > > > > For example, commit 4ac214574d2d ("KVM: MMU: mark role_regs and role accessors as maybe unused") > > > > > > > > It is better to fix and forget instead of trying to fix clang. > > > > > > "Because clang reports warnings for unused inlines declared in a .c file, > > > mark both sets of accessors as __maybe_unused." > > > > > > Yikes, what a thing to do. > > > > Jason, > > > > I don't see this patch in the tree and patchworks status says that it is "new". > > https://patchwork.kernel.org/project/linux-rdma/patch/4a8101919b765e01d7fde6f27fd572c958deeb4a.1636267207.git.leonro@nvidia.com/ > > > > Should I do anything extra to progress with this patch? > > It is merge window, I'm not doing anything with patches until rc1 > unless it is an emergency and a random clang failure on mips isn't > an emergency. ok, I didn't know that build failure is not important. Thanks > > Jason ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH rdma-rc] RDMA/netlink: Annotate unused function that is needed for compilation check 2021-11-10 14:52 ` Leon Romanovsky @ 2021-11-10 14:54 ` Jason Gunthorpe 2021-11-10 15:02 ` Leon Romanovsky 0 siblings, 1 reply; 10+ messages in thread From: Jason Gunthorpe @ 2021-11-10 14:54 UTC (permalink / raw) To: Leon Romanovsky; +Cc: Doug Ledford, kernel test robot, linux-kernel, linux-rdma On Wed, Nov 10, 2021 at 04:52:45PM +0200, Leon Romanovsky wrote: > On Wed, Nov 10, 2021 at 10:42:44AM -0400, Jason Gunthorpe wrote: > > On Wed, Nov 10, 2021 at 04:20:31PM +0200, Leon Romanovsky wrote: > > > On Mon, Nov 08, 2021 at 08:48:39AM -0400, Jason Gunthorpe wrote: > > > > On Mon, Nov 08, 2021 at 02:47:19PM +0200, Leon Romanovsky wrote: > > > > > On Mon, Nov 08, 2021 at 08:36:39AM -0400, Jason Gunthorpe wrote: > > > > > > 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 > > > > > > > +++ 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 > > > > > > > > > > I saw many examples like this in arch code. > > > > > For example, commit 4ac214574d2d ("KVM: MMU: mark role_regs and role accessors as maybe unused") > > > > > > > > > > It is better to fix and forget instead of trying to fix clang. > > > > > > > > "Because clang reports warnings for unused inlines declared in a .c file, > > > > mark both sets of accessors as __maybe_unused." > > > > > > > > Yikes, what a thing to do. > > > > > > Jason, > > > > > > I don't see this patch in the tree and patchworks status says that it is "new". > > > https://patchwork.kernel.org/project/linux-rdma/patch/4a8101919b765e01d7fde6f27fd572c958deeb4a.1636267207.git.leonro@nvidia.com/ > > > > > > Should I do anything extra to progress with this patch? > > > > It is merge window, I'm not doing anything with patches until rc1 > > unless it is an emergency and a random clang failure on mips isn't > > an emergency. > > ok, I didn't know that build failure is not important. It is a warning then the clang mips compiler crashes, so <shrug> None of this is new code, frankly I'm confused why we are only seeing it now since I'm running clang 12 builds standard.. Is it W=1 or something? Jason ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH rdma-rc] RDMA/netlink: Annotate unused function that is needed for compilation check 2021-11-10 14:54 ` Jason Gunthorpe @ 2021-11-10 15:02 ` Leon Romanovsky 0 siblings, 0 replies; 10+ messages in thread From: Leon Romanovsky @ 2021-11-10 15:02 UTC (permalink / raw) To: Jason Gunthorpe Cc: Doug Ledford, kernel test robot, linux-kernel, linux-rdma, Eric Dumazet On Wed, Nov 10, 2021 at 10:54:42AM -0400, Jason Gunthorpe wrote: > On Wed, Nov 10, 2021 at 04:52:45PM +0200, Leon Romanovsky wrote: > > On Wed, Nov 10, 2021 at 10:42:44AM -0400, Jason Gunthorpe wrote: > > > On Wed, Nov 10, 2021 at 04:20:31PM +0200, Leon Romanovsky wrote: > > > > On Mon, Nov 08, 2021 at 08:48:39AM -0400, Jason Gunthorpe wrote: > > > > > On Mon, Nov 08, 2021 at 02:47:19PM +0200, Leon Romanovsky wrote: > > > > > > On Mon, Nov 08, 2021 at 08:36:39AM -0400, Jason Gunthorpe wrote: > > > > > > > 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 > > > > > > > > +++ 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 > > > > > > > > > > > > I saw many examples like this in arch code. > > > > > > For example, commit 4ac214574d2d ("KVM: MMU: mark role_regs and role accessors as maybe unused") > > > > > > > > > > > > It is better to fix and forget instead of trying to fix clang. > > > > > > > > > > "Because clang reports warnings for unused inlines declared in a .c file, > > > > > mark both sets of accessors as __maybe_unused." > > > > > > > > > > Yikes, what a thing to do. > > > > > > > > Jason, > > > > > > > > I don't see this patch in the tree and patchworks status says that it is "new". > > > > https://patchwork.kernel.org/project/linux-rdma/patch/4a8101919b765e01d7fde6f27fd572c958deeb4a.1636267207.git.leonro@nvidia.com/ > > > > > > > > Should I do anything extra to progress with this patch? > > > > > > It is merge window, I'm not doing anything with patches until rc1 > > > unless it is an emergency and a random clang failure on mips isn't > > > an emergency. > > > > ok, I didn't know that build failure is not important. > > It is a warning then the clang mips compiler crashes, so <shrug> > > None of this is new code, frankly I'm confused why we are only seeing > it now since I'm running clang 12 builds standard.. Is it W=1 or something? Yes, it is W=1, the failure was reported 5 months ago, but to wrong person :) https://lore.kernel.org/lkml/202105122353.5x1Ez6Dh-lkp@intel.com/ > > Jason ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH rdma-rc] RDMA/netlink: Annotate unused function that is needed for compilation check 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 @ 2021-11-16 17:52 ` Jason Gunthorpe 1 sibling, 0 replies; 10+ messages in thread From: Jason Gunthorpe @ 2021-11-16 17:52 UTC (permalink / raw) To: Leon Romanovsky Cc: Doug Ledford, Leon Romanovsky, kernel test robot, linux-kernel, linux-rdma 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(-) Applied to for-rc, thanks Jason ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2021-11-16 17:52 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 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 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
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).