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>,
	Damien Le Moal <dlemoal@kernel.org>,
	"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Subject: [PATCH v2 10/11] scsi: core: Remove the .slave_configure() method
Date: Wed,  2 Oct 2024 13:34:02 -0700	[thread overview]
Message-ID: <20241002203528.4104996-11-bvanassche@acm.org> (raw)
In-Reply-To: <20241002203528.4104996-1-bvanassche@acm.org>

Now that all SCSI drivers have been converted from .slave_configure() to
.sdev_configure(), remove support for .slave_configure() from the SCSI
core.

Cc: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/scsi_scan.c |  4 +---
 include/scsi/scsi_host.h | 10 +++-------
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 8eae48b0b821..f1830401b9c1 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -1076,8 +1076,6 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result,
 
 	if (hostt->sdev_configure)
 		ret = hostt->sdev_configure(sdev, &lim);
-	else if (hostt->slave_configure)
-		ret = hostt->slave_configure(sdev);
 	if (ret) {
 		queue_limits_cancel_update(sdev->request_queue);
 		/*
@@ -1102,7 +1100,7 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result,
 	 * Set up budget map again since memory consumption of the map depends
 	 * on actual queue depth.
 	 */
-	if (hostt->sdev_configure || hostt->slave_configure)
+	if (hostt->sdev_configure)
 		scsi_realloc_sdev_budget_map(sdev, sdev->queue_depth);
 
 	if (sdev->scsi_level >= SCSI_3)
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index abf203544d47..7ae99c6d26cb 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -169,11 +169,11 @@ struct scsi_host_template {
 	 *
 	 * Deallocation:  If we didn't find any devices at this ID, you will
 	 * get an immediate call to sdev_destroy().  If we find something
-	 * here then you will get a call to slave_configure(), then the
+	 * here then you will get a call to sdev_configure(), then the
 	 * device will be used for however long it is kept around, then when
 	 * the device is removed from the system (or * possibly at reboot
 	 * time), you will then get a call to sdev_destroy().  This is
-	 * assuming you implement slave_configure and sdev_destroy.
+	 * assuming you implement sdev_configure and sdev_destroy.
 	 * However, if you allocate memory and hang it off the device struct,
 	 * then you must implement the sdev_destroy() routine at a minimum
 	 * in order to avoid leaking memory
@@ -211,19 +211,15 @@ struct scsi_host_template {
 	 *     up after yourself before returning non-0
 	 *
 	 * Status: OPTIONAL
-	 *
-	 * Note: slave_configure is the legacy version, use sdev_configure for
-	 * all new code.  A driver must never define both.
 	 */
 	int (* sdev_configure)(struct scsi_device *, struct queue_limits *lim);
-	int (* slave_configure)(struct scsi_device *);
 
 	/*
 	 * Immediately prior to deallocating the device and after all activity
 	 * has ceased the mid layer calls this point so that the low level
 	 * driver may completely detach itself from the scsi device and vice
 	 * versa.  The low level driver is responsible for freeing any memory
-	 * it allocated in the sdev_prep or slave_configure calls. 
+	 * it allocated in the sdev_prep or sdev_configure calls.
 	 *
 	 * Status: OPTIONAL
 	 */

  parent reply	other threads:[~2024-10-02 20:37 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-02 20:33 [PATCH v2 00/11] Improve the "slave" function names Bart Van Assche
2024-10-02 20:33 ` [PATCH v2 01/11] scsi: arcmsr: Remove the changelog Bart Van Assche
2024-10-02 22:28   ` Damien Le Moal
2024-10-02 22:39   ` James Bottomley
2024-10-02 23:47     ` Bart Van Assche
2024-10-02 20:33 ` [PATCH v2 02/11] scsi: ips: " Bart Van Assche
2024-10-02 22:28   ` Damien Le Moal
2024-10-02 20:33 ` [PATCH v2 03/11] scsi: lpfc: " Bart Van Assche
2024-10-02 22:29   ` Damien Le Moal
2024-10-02 20:33 ` [PATCH v2 04/11] scsi: ncr53c8xx: " Bart Van Assche
2024-10-02 22:29   ` Damien Le Moal
2024-10-02 20:33 ` [PATCH v2 05/11] scsi: sym53c8xx: " Bart Van Assche
2024-10-02 22:30   ` Damien Le Moal
2024-10-02 20:33 ` [PATCH v2 06/11] scsi: Rename .slave_alloc() and .slave_destroy() Bart Van Assche
2024-10-02 22:39   ` Damien Le Moal
2024-10-03 21:08     ` Bart Van Assche
2024-10-02 20:33 ` [PATCH v2 07/11] scsi: core: Rename .slave_alloc() and .slave_destroy() in the documentation Bart Van Assche
2024-10-02 20:34 ` [PATCH v2 08/11] scsi: Rename .device_configure() into .sdev_configure() Bart Van Assche
2024-10-02 22:35   ` Damien Le Moal
2024-10-02 20:34 ` [PATCH v2 09/11] scsi: Convert SCSI drivers to .sdev_configure() Bart Van Assche
2024-10-02 22:37   ` Damien Le Moal
2024-10-02 20:34 ` Bart Van Assche [this message]
2024-10-02 22:38   ` [PATCH v2 10/11] scsi: core: Remove the .slave_configure() method Damien Le Moal
2024-10-02 20:34 ` [PATCH v2 11/11] scsi: core: Update .slave_configure() references in the documentation Bart Van Assche
2024-10-02 22:38   ` Damien Le Moal

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=20241002203528.4104996-11-bvanassche@acm.org \
    --to=bvanassche@acm.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=dlemoal@kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --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