From: Lizhe <sensor1010@163.com>
To: jejb@linux.ibm.com, martin.petersen@oracle.com
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
Lizhe <sensor1010@163.com>
Subject: [PATCH v1] scsi: scsi_debug: Remove redundant driver match function
Date: Sun, 19 Mar 2023 12:27:32 +0800 [thread overview]
Message-ID: <20230319042732.278691-1-sensor1010@163.com> (raw)
If there is no driver match function, the driver core assumes that each
candidate pair (driver, device) matches, see driver_match_device()
Drop the pseudo_lld bus's match function that always returned 1 and so
implements the same behaviour as when there is no match function.
Signed-off-by: Lizhe <sensor1010@163.com>
---
drivers/scsi/scsi_debug.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index 8553277effb3..fa6f150b7364 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -7950,15 +7950,8 @@ static void sdebug_driver_remove(struct device *dev)
scsi_host_put(sdbg_host->shost);
}
-static int pseudo_lld_bus_match(struct device *dev,
- struct device_driver *dev_driver)
-{
- return 1;
-}
-
static struct bus_type pseudo_lld_bus = {
.name = "pseudo",
- .match = pseudo_lld_bus_match,
.probe = sdebug_driver_probe,
.remove = sdebug_driver_remove,
.drv_groups = sdebug_drv_groups,
--
2.34.1
next reply other threads:[~2023-03-19 4:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-19 4:27 Lizhe [this message]
2023-03-21 17:52 ` [PATCH v1] scsi: scsi_debug: Remove redundant driver match function John Garry
2023-03-24 21:43 ` Martin K. Petersen
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=20230319042732.278691-1-sensor1010@163.com \
--to=sensor1010@163.com \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.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