public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: "Martin K . Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, Bart Van Assche <bvanassche@acm.org>,
	Bradley Grove <linuxdrivers@attotech.com>,
	"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Subject: [PATCH v2 05/18] scsi: esas2r: Simplify an alloc_ordered_workqueue() invocation
Date: Fri, 16 Aug 2024 14:55:28 -0700	[thread overview]
Message-ID: <20240816215605.36240-6-bvanassche@acm.org> (raw)
In-Reply-To: <20240816215605.36240-1-bvanassche@acm.org>

Let alloc_ordered_workqueue() format the workqueue name instead of calling
snprintf() explicitly.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/esas2r/esas2r.h      | 1 -
 drivers/scsi/esas2r/esas2r_init.c | 6 ++----
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/scsi/esas2r/esas2r.h b/drivers/scsi/esas2r/esas2r.h
index ed63f7a9ea54..8a133254c4f6 100644
--- a/drivers/scsi/esas2r/esas2r.h
+++ b/drivers/scsi/esas2r/esas2r.h
@@ -929,7 +929,6 @@ struct esas2r_adapter {
 	struct list_head fw_event_list;
 	spinlock_t fw_event_lock;
 	u8 fw_events_off;                       /* if '1', then ignore events */
-	char fw_event_q_name[ESAS2R_KOBJ_NAME_LEN];
 	/*
 	 * intr_mode stores the interrupt mode currently being used by this
 	 * adapter. it is based on the interrupt_mode module parameter, but
diff --git a/drivers/scsi/esas2r/esas2r_init.c b/drivers/scsi/esas2r/esas2r_init.c
index ff1fa3160c61..0cea5f3d1a08 100644
--- a/drivers/scsi/esas2r/esas2r_init.c
+++ b/drivers/scsi/esas2r/esas2r_init.c
@@ -311,10 +311,8 @@ int esas2r_init_adapter(struct Scsi_Host *host, struct pci_dev *pcid,
 	sema_init(&a->nvram_semaphore, 1);
 
 	esas2r_fw_event_off(a);
-	snprintf(a->fw_event_q_name, ESAS2R_KOBJ_NAME_LEN, "esas2r/%d",
-		 a->index);
-	a->fw_event_q = alloc_ordered_workqueue("%s", WQ_MEM_RECLAIM,
-						a->fw_event_q_name);
+	a->fw_event_q =
+		alloc_ordered_workqueue("esas2r/%d", WQ_MEM_RECLAIM, a->index);
 
 	init_waitqueue_head(&a->buffered_ioctl_waiter);
 	init_waitqueue_head(&a->nvram_waiter);

  parent reply	other threads:[~2024-08-16 21:56 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-16 21:55 [PATCH v2 00/18] Simplify multiple create*_workqueue() invocations Bart Van Assche
2024-08-16 21:55 ` [PATCH v2 01/18] scsi: Expand all " Bart Van Assche
2024-08-18 23:25   ` Damien Le Moal
2024-08-19 17:17     ` Bart Van Assche
2024-08-19 23:15       ` Damien Le Moal
2024-08-20  5:59   ` Peter Wang (王信友)
2024-08-16 21:55 ` [PATCH v2 02/18] scsi: mptfusion: Simplify the alloc*_workqueue() invocations Bart Van Assche
2024-08-18 23:51   ` Damien Le Moal
2024-08-19 17:08     ` Bart Van Assche
2024-08-19 23:05       ` Damien Le Moal
2024-08-16 21:55 ` [PATCH v2 03/18] scsi: be2iscsi: Simplify an alloc_workqueue() invocation Bart Van Assche
2024-08-16 21:55 ` [PATCH v2 04/18] scsi: bfa: Simplify an alloc_ordered_workqueue() invocation Bart Van Assche
2024-08-16 21:55 ` Bart Van Assche [this message]
2024-08-16 21:55 ` [PATCH v2 06/18] scsi: fcoe: Simplify alloc_ordered_workqueue() invocations Bart Van Assche
2024-08-16 21:55 ` [PATCH v2 07/18] scsi: ibmvscsi_tgt: Simplify an alloc_workqueue() invocation Bart Van Assche
2024-08-16 21:55 ` [PATCH v2 08/18] scsi: mpi3mr: Simplify an alloc_ordered_workqueue() invocation Bart Van Assche
2024-08-16 21:55 ` [PATCH v2 09/18] scsi: mpt3sas: " Bart Van Assche
2024-08-16 21:55 ` [PATCH v2 10/18] scsi: myrb: " Bart Van Assche
2024-08-16 21:55 ` [PATCH v2 11/18] scsi: myrs: " Bart Van Assche
2024-08-16 21:55 ` [PATCH v2 12/18] scsi: qedf: Simplify alloc_workqueue() invocations Bart Van Assche
2024-08-16 21:55 ` [PATCH v2 13/18] scsi: qedi: Simplify an alloc_workqueue() invocation Bart Van Assche
2024-08-16 21:55 ` [PATCH v2 14/18] scsi: snic: Simplify alloc_workqueue() invocations Bart Van Assche
2024-08-16 21:55 ` [PATCH v2 15/18] scsi: scsi_transport_fc: " Bart Van Assche
2024-08-16 21:55 ` [PATCH v2 16/18] scsi: stex: Simplify an alloc_ordered_workqueue() invocation Bart Van Assche
2024-08-16 21:55 ` [PATCH v2 17/18] scsi: ufs: Simplify alloc*_workqueue() invocation Bart Van Assche
2024-08-17  1:53   ` Manivannan Sadhasivam
2024-08-20  6:00   ` Peter Wang (王信友)
2024-08-16 21:55 ` [PATCH v2 18/18] scsi: core: Simplify an alloc_workqueue() invocation Bart Van Assche

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=20240816215605.36240-6-bvanassche@acm.org \
    --to=bvanassche@acm.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linuxdrivers@attotech.com \
    --cc=martin.petersen@oracle.com \
    /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