forked from Minki/linux
RDMA/core: Fix a WARN() message
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: 3856ec4b93
("RDMA/core: Add RDMA_NLDEV_CMD_NEWLINK/DELLINK support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Majd Dibbiny <majd@mellanox.com>
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
parent
c50866e285
commit
afc1990e08
@ -1222,10 +1222,8 @@ out:
|
|||||||
void rdma_link_register(struct rdma_link_ops *ops)
|
void rdma_link_register(struct rdma_link_ops *ops)
|
||||||
{
|
{
|
||||||
down_write(&link_ops_rwsem);
|
down_write(&link_ops_rwsem);
|
||||||
if (link_ops_get(ops->type)) {
|
if (WARN_ON_ONCE(link_ops_get(ops->type)))
|
||||||
WARN_ONCE("Duplicate rdma_link_ops! %s\n", ops->type);
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
|
||||||
list_add(&ops->list, &link_ops);
|
list_add(&ops->list, &link_ops);
|
||||||
out:
|
out:
|
||||||
up_write(&link_ops_rwsem);
|
up_write(&link_ops_rwsem);
|
||||||
|
Loading…
Reference in New Issue
Block a user