mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-05 05:59:10 +08:00
RDMA/mad: Simplify an alloc_ordered_workqueue() invocation
Let alloc_ordered_workqueue() format the workqueue name instead of calling snprintf() explicitly. Link: https://patch.msgid.link/r/20240823101840.515398-3-ruanjinjie@huawei.com Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
This commit is contained in:
committed by
Jason Gunthorpe
parent
92c7ad8364
commit
7229d7b64e
@@ -2939,7 +2939,6 @@ static int ib_mad_port_open(struct ib_device *device,
|
||||
int ret, cq_size;
|
||||
struct ib_mad_port_private *port_priv;
|
||||
unsigned long flags;
|
||||
char name[sizeof "ib_mad123"];
|
||||
int has_smi;
|
||||
|
||||
if (WARN_ON(rdma_max_mad_size(device, port_num) < IB_MGMT_MAD_SIZE))
|
||||
@@ -2992,8 +2991,8 @@ static int ib_mad_port_open(struct ib_device *device,
|
||||
goto error7;
|
||||
}
|
||||
|
||||
snprintf(name, sizeof(name), "ib_mad%u", port_num);
|
||||
port_priv->wq = alloc_ordered_workqueue(name, WQ_MEM_RECLAIM);
|
||||
port_priv->wq = alloc_ordered_workqueue("ib_mad%u", WQ_MEM_RECLAIM,
|
||||
port_num);
|
||||
if (!port_priv->wq) {
|
||||
ret = -ENOMEM;
|
||||
goto error8;
|
||||
|
||||
Reference in New Issue
Block a user