netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] net/iucv: Remove redundant driver match function
@ 2023-03-19  5:08 Lizhe
  2023-03-19 20:16 ` Heiko Carstens
  0 siblings, 1 reply; 3+ messages in thread
From: Lizhe @ 2023-03-19  5:08 UTC (permalink / raw)
  To: wintera, wenjia, davem, edumazet, kuba, pabeni
  Cc: linux-s390, netdev, 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 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>
---
 net/iucv/iucv.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c
index fc3fddeb6f36..7dd15dead88e 100644
--- a/net/iucv/iucv.c
+++ b/net/iucv/iucv.c
@@ -62,14 +62,8 @@
 #define IUCV_IPNORPY	0x10
 #define IUCV_IPALL	0x80
 
-static int iucv_bus_match(struct device *dev, struct device_driver *drv)
-{
-	return 0;
-}
-
 struct bus_type iucv_bus = {
 	.name = "iucv",
-	.match = iucv_bus_match,
 };
 EXPORT_SYMBOL(iucv_bus);
 
-- 
2.34.1


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

* Re: [PATCH v1] net/iucv: Remove redundant driver match function
  2023-03-19  5:08 [PATCH v1] net/iucv: Remove redundant driver match function Lizhe
@ 2023-03-19 20:16 ` Heiko Carstens
  2023-03-20 16:20   ` Alex Williamson
  0 siblings, 1 reply; 3+ messages in thread
From: Heiko Carstens @ 2023-03-19 20:16 UTC (permalink / raw)
  To: Lizhe
  Cc: wintera, wenjia, davem, edumazet, kuba, pabeni, linux-s390,
	netdev, linux-kernel

On Sun, Mar 19, 2023 at 01:08:40PM +0800, 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 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>
> ---
>  net/iucv/iucv.c | 6 ------
>  1 file changed, 6 deletions(-)
...
> -static int iucv_bus_match(struct device *dev, struct device_driver *drv)
> -{
> -	return 0;
        ^^^^^^^^

If I'm not wrong then 0 != 1.

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

* Re: [PATCH v1] net/iucv: Remove redundant driver match function
  2023-03-19 20:16 ` Heiko Carstens
@ 2023-03-20 16:20   ` Alex Williamson
  0 siblings, 0 replies; 3+ messages in thread
From: Alex Williamson @ 2023-03-20 16:20 UTC (permalink / raw)
  To: Heiko Carstens
  Cc: Lizhe, wintera, wenjia, davem, edumazet, kuba, pabeni, linux-s390,
	netdev, linux-kernel

On Sun, 19 Mar 2023 21:16:31 +0100
Heiko Carstens <hca@linux.ibm.com> wrote:

> On Sun, Mar 19, 2023 at 01:08:40PM +0800, 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 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>
> > ---
> >  net/iucv/iucv.c | 6 ------
> >  1 file changed, 6 deletions(-)  
> ...
> > -static int iucv_bus_match(struct device *dev, struct device_driver *drv)
> > -{
> > -	return 0;  
>         ^^^^^^^^
> 
> If I'm not wrong then 0 != 1.
> 

Seems like an unchecked patch bot, proposed an identical bad patch for
vfio/mdev.  Thanks,

Alex


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

end of thread, other threads:[~2023-03-20 16:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-19  5:08 [PATCH v1] net/iucv: Remove redundant driver match function Lizhe
2023-03-19 20:16 ` Heiko Carstens
2023-03-20 16:20   ` Alex Williamson

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