From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: [PATCH] RDMA/core: Fix a WARN() message
Date: Fri, 22 Feb 2019 06:29:02 +0000 [thread overview]
Message-ID: <20190222062902.GB30993@kadam> (raw)
The first parameter of WARN_ONCE() is a condition, then following
parameters are the message. In this case, we left out the condition so
it will just print the ops->type string.
Fixes: 3856ec4b93c9 ("RDMA/core: Add RDMA_NLDEV_CMD_NEWLINK/DELLINK support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/infiniband/core/nldev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/core/nldev.c b/drivers/infiniband/core/nldev.c
index 5e94dc87f04f..660a192a44a3 100644
--- a/drivers/infiniband/core/nldev.c
+++ b/drivers/infiniband/core/nldev.c
@@ -1223,7 +1223,7 @@ void rdma_link_register(struct rdma_link_ops *ops)
{
down_write(&link_ops_rwsem);
if (link_ops_get(ops->type)) {
- WARN_ONCE("Duplicate rdma_link_ops! %s\n", ops->type);
+ WARN_ONCE(1, "Duplicate rdma_link_ops! %s\n", ops->type);
goto out;
}
list_add(&ops->list, &link_ops);
--
2.17.1
next reply other threads:[~2019-02-22 6:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-22 6:29 Dan Carpenter [this message]
2019-02-22 9:47 ` [PATCH] RDMA/core: Fix a WARN() message Majd Dibbiny
2019-02-22 15:25 ` Steve Wise
2019-02-22 18:56 ` Jason Gunthorpe
2019-02-22 19:18 ` Dan Carpenter
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=20190222062902.GB30993@kadam \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@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