public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: linux-rdma@vger.kernel.org, Stephen Rothwell <sfr@canb.auug.org.au>
Subject: [PATCH rdma-next] RDMA/nldev: Fix section mismatch warning for nldev
Date: Fri, 28 Oct 2022 09:58:56 +0300	[thread overview]
Message-ID: <50e3139ef8cbbff5db858a4916be309e012313b1.1666940305.git.leon@kernel.org> (raw)

ppc64_defconfig) produced this warning:

WARNING: modpost: drivers/infiniband/core/ib_core.o: section mismatch in reference: .init_module (section: .init.text) -> .nldev_exit (section: .exit.text)

Fix it by removing __init/__exit markers as nldev is part of ib_core.ko
and as such doesn't require any special notations for entry/exit functions.

Fixes: 6c80b41abe22 ("RDMA/netlink: Add nldev initialization flows")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
---
 drivers/infiniband/core/nldev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/core/nldev.c b/drivers/infiniband/core/nldev.c
index b92358f606d0..4b6815dcd261 100644
--- a/drivers/infiniband/core/nldev.c
+++ b/drivers/infiniband/core/nldev.c
@@ -2532,12 +2532,12 @@ static const struct rdma_nl_cbs nldev_cb_table[RDMA_NLDEV_NUM_OPS] = {
 	},
 };
 
-void __init nldev_init(void)
+void nldev_init(void)
 {
 	rdma_nl_register(RDMA_NL_NLDEV, nldev_cb_table);
 }
 
-void __exit nldev_exit(void)
+void nldev_exit(void)
 {
 	rdma_nl_unregister(RDMA_NL_NLDEV);
 }
-- 
2.37.3


             reply	other threads:[~2022-10-28  6:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-28  6:58 Leon Romanovsky [this message]
2022-10-28  7:12 ` [PATCH rdma-next] RDMA/nldev: Fix section mismatch warning for nldev Leon Romanovsky
2022-10-28 16:00 ` Jason Gunthorpe
2022-10-28 16:14   ` Leon Romanovsky
2022-10-28 16:15     ` Jason Gunthorpe
2022-10-28 16:19       ` Leon Romanovsky
2022-10-28 16:34         ` Jason Gunthorpe
2022-10-28 16:47           ` Leon Romanovsky
2022-10-28 16:48             ` 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=50e3139ef8cbbff5db858a4916be309e012313b1.1666940305.git.leon@kernel.org \
    --to=leon@kernel.org \
    --cc=jgg@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /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