Skip to contentSkip to conversation

net/iucv: Remove redundant driver match function

PATCH In review Lizhe 3 participants 3 messages Mar 19, 2023 – Mar 20, 2023

Subsystems (4)
lore
Share & tools
lore

Lizhe

author
#0 lore raw

PATCH 1/1 net/iucv: Remove redundant driver match function

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

---
 net/iucv/iucv.c | 6 ------
 1 file changed, 6 deletions(-)
net/iucv/iucv.c +0 -6
index fc3fddeb6f36..7dd15dead88e 100644
@@ -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);
 
Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 5 lines · 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

...

Quoted 5 lines
---
 net/iucv/iucv.c | 6 ------
 1 file changed, 6 deletions(-)

...

net/iucv/iucv.c line 67

Quoted 3 lines
net/iucv/iucv.c +0 -3
-static int iucv_bus_match(struct device *dev, struct device_driver *drv)
-{
-	return 0;
        ^^^^^^^^

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

#2 lore raw
Quoted 12 lines · On Sun, 19 Mar 2023 21:16:31 +0100 Heiko Carstens <[email protected]> wrote:
Quoted 5 lines · 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

...

Quoted 5 lines
---
 net/iucv/iucv.c | 6 ------
 1 file changed, 6 deletions(-)  
Quoted 8 lines

...

net/iucv/iucv.c line 67

Quoted 3 lines
net/iucv/iucv.c +0 -3
-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