2023-03-19 04:09:29

by Lizhe

[permalink] [raw]
Subject: [PATCH v1] nubus: Remove redunant 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()

Signed-off-by: Lizhe <[email protected]>
---
drivers/nubus/bus.c | 6 ------
1 file changed, 6 deletions(-)

diff --git a/drivers/nubus/bus.c b/drivers/nubus/bus.c
index 17fad660032c..72921e4f35f6 100644
--- a/drivers/nubus/bus.c
+++ b/drivers/nubus/bus.c
@@ -14,11 +14,6 @@
#define to_nubus_board(d) container_of(d, struct nubus_board, dev)
#define to_nubus_driver(d) container_of(d, struct nubus_driver, driver)

-static int nubus_bus_match(struct device *dev, struct device_driver *driver)
-{
- return 1;
-}
-
static int nubus_device_probe(struct device *dev)
{
struct nubus_driver *ndrv = to_nubus_driver(dev->driver);
@@ -39,7 +34,6 @@ static void nubus_device_remove(struct device *dev)

struct bus_type nubus_bus_type = {
.name = "nubus",
- .match = nubus_bus_match,
.probe = nubus_device_probe,
.remove = nubus_device_remove,
};
--
2.34.1



2023-03-19 08:31:57

by Finn Thain

[permalink] [raw]
Subject: Re: [PATCH v1] nubus: Remove redunant driver match function

Hi Lizhe,

On Sun, 19 Mar 2023, Lizhe wrote:

> If there is no driver match function, the driver core assumes that each
> candidate pair (driver, device)matches, see driver_match_device()
>

As it happens, the same patch from a different author was accepted last
week.

https://lore.kernel.org/linux-m68k/CAMuHMdXQPh0BaQA1csgJbPxjorY15-V9=jb7ZL8Yq24Qe7k9jQ@mail.gmail.com/T/#t

2023-03-19 14:21:22

by Uwe Kleine-König

[permalink] [raw]
Subject: Re: [PATCH v1] nubus: Remove redunant driver match function

Hello Lizhe,

On Sun, Mar 19, 2023 at 07:01:33PM +0800, lizhe wrote:
> Fthain.
> I was the first to submit this patch,

You sent a patch doing this conversion to several drivers at once[1]
back in May 2022. You were asked to split up by subsystem and I cannot
find anything more recent; neither in my inbox nor on
lore.kernel.org[2]. So unless I missed something I wouldn't claim you
already sent this patch.

> u.kleline-koenig, please
> delete the path you submitted, this patch does not belong to
> you

Even if I'd agree, I couldn't. That's up to Finn (I think) to drop this
patch again from his queue and then accept a similar patch from you. If
that's what Finn want's to do and it makes you happy, I won't oppose for
the sake of resolving that argument.

Having said that I didn't even remember your patch. I just stumbled over
this patch opportunity while doing some treewide cleanups.

Best regards
Uwe

[1] https://lore.kernel.org/linux-kernel/[email protected]
[2] https://lore.kernel.org/all/?q=drivers%2Fnubus%2Fbus.c

--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | https://www.pengutronix.de/ |


Attachments:
(No filename) (1.21 kB)
signature.asc (488.00 B)
Download all attachments

2023-03-20 03:48:24

by Finn Thain

[permalink] [raw]
Subject: Re:Re: [PATCH v1] nubus: Remove redunant driver match function

On Sun, 19 Mar 2023, lizhe wrote:

> i have already issued this patch a year ago, please accept my patch.
> Please see the patch information below :
>
> https://lore.kernel.org/linux-m68k/[email protected]/

What can I possibly do? Your link shows a thread with an acked-by from me
from 10 months ago. Also in that thread is a review from Greg
Kroah-Hartman that you also appear to have missed.

2023-03-20 03:48:53

by Finn Thain

[permalink] [raw]
Subject: Re: [PATCH v1] nubus: Remove redunant driver match function

On Sun, 19 Mar 2023, Uwe Kleine-König wrote:

> On Sun, Mar 19, 2023 at 07:01:33PM +0800, lizhe wrote:
>
> > u.kleline-koenig, please
> > delete the path you submitted, this patch does not belong to you
>
> Even if I'd agree, I couldn't. That's up to Finn (I think) to drop this
> patch again from his queue and then accept a similar patch from you.

I leave it up to Geert to apply Nubus patches that pass review. There is
no git tree for this subsystem and the only arch to make use of it so far
is m68k.

In my opinion, there's nothing novel about deleting code so it's quite
meaningless what "git log" says about authorship. That's doubly true for
redundant code, which compilers elide as a matter of course.

If some developers are receiving incentives to do juanitorial work (like
running coccinelle scripts) then I'd like to know whether a line added has
the same price as a line deleted.

Maybe some developers are deleting redundant code I wrote so as to make my
life easier as the maintainer. Maybe they are not getting paid for that.
I'm not aware of that having happened here, but if it did, thanks a lot.

2023-03-20 09:41:02

by Uwe Kleine-König

[permalink] [raw]
Subject: Re: [PATCH v1] nubus: Remove redunant driver match function

Hello Finn,

[Cc += Geert]

On Mon, Mar 20, 2023 at 02:49:41PM +1100, Finn Thain wrote:
> On Sun, 19 Mar 2023, Uwe Kleine-K?nig wrote:
>
> > On Sun, Mar 19, 2023 at 07:01:33PM +0800, lizhe wrote:
> >
> > > u.kleline-koenig, please
> > > delete the path you submitted, this patch does not belong to you
> >
> > Even if I'd agree, I couldn't. That's up to Finn (I think) to drop this
> > patch again from his queue and then accept a similar patch from you.

Iff the patch under discussion is considered for applying: I just
noticed we want:

$Subject ~= s/redunant/redundant/

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | https://www.pengutronix.de/ |


Attachments:
(No filename) (759.00 B)
signature.asc (488.00 B)
Download all attachments