From: Jinjie Ruan Date: Fri, 23 Aug 2024 10:18:37 +0000 (+0800) Subject: RDMA/qib: Simplify an alloc_ordered_workqueue() invocation X-Git-Tag: v6.12-rc1~72^2~78 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=92c7ad8364b2cad7e3c4842f3a77dda3b6e1fb88;p=thirdparty%2Fkernel%2Flinux.git RDMA/qib: 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-2-ruanjinjie@huawei.com Signed-off-by: Jinjie Ruan Signed-off-by: Jason Gunthorpe --- diff --git a/drivers/infiniband/hw/qib/qib_init.c b/drivers/infiniband/hw/qib/qib_init.c index db3b25c8433a1..4100656fe9a3e 100644 --- a/drivers/infiniband/hw/qib/qib_init.c +++ b/drivers/infiniband/hw/qib/qib_init.c @@ -581,12 +581,9 @@ static int qib_create_workqueues(struct qib_devdata *dd) for (pidx = 0; pidx < dd->num_pports; ++pidx) { ppd = dd->pport + pidx; if (!ppd->qib_wq) { - char wq_name[23]; - - snprintf(wq_name, sizeof(wq_name), "qib%d_%d", - dd->unit, pidx); - ppd->qib_wq = alloc_ordered_workqueue(wq_name, - WQ_MEM_RECLAIM); + ppd->qib_wq = alloc_ordered_workqueue("qib%d_%d", + WQ_MEM_RECLAIM, + dd->unit, pidx); if (!ppd->qib_wq) goto wq_error; }