linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] scsi: scsi_debug: Remove redundant driver match function
@ 2023-03-19  4:27 Lizhe
  2023-03-21 17:52 ` John Garry
  2023-03-24 21:43 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Lizhe @ 2023-03-19  4:27 UTC (permalink / raw)
  To: jejb, martin.petersen; +Cc: linux-scsi, linux-kernel, Lizhe

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v1] scsi: scsi_debug: Remove redundant driver match function
  2023-03-19  4:27 [PATCH v1] scsi: scsi_debug: Remove redundant driver match function Lizhe
@ 2023-03-21 17:52 ` John Garry
  2023-03-24 21:43 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: John Garry @ 2023-03-21 17:52 UTC (permalink / raw)
  To: Lizhe, jejb, martin.petersen; +Cc: linux-scsi, linux-kernel

On 19/03/2023 04:27, Lizhe wrote:
> 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

I'd have "Drop the pseudo_lld_bus match function .."

> implements the same behaviour as when there is no match function.
> 
> Signed-off-by: Lizhe<sensor1010@163.com>
> ---

Reviewed-by: John Garry <john.g.garry@oracle.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v1] scsi: scsi_debug: Remove redundant driver match function
  2023-03-19  4:27 [PATCH v1] scsi: scsi_debug: Remove redundant driver match function Lizhe
  2023-03-21 17:52 ` John Garry
@ 2023-03-24 21:43 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2023-03-24 21:43 UTC (permalink / raw)
  To: Lizhe; +Cc: jejb, martin.petersen, linux-scsi, linux-kernel


Lizhe,

> 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.

Applied to 6.4/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-24 21:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-19  4:27 [PATCH v1] scsi: scsi_debug: Remove redundant driver match function Lizhe
2023-03-21 17:52 ` John Garry
2023-03-24 21:43 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).