| Message ID | 20240923094249.80399-1-chentao@kylinos.cn |
|---|---|
| Headers | show |
| Series | Add dev_is_amba and replace the usage in platform | expand |
On Mon, Sep 23, 2024 at 05:42:47PM +0800, Kunwu Chan wrote: > Add dev_is_amba() function to determine > whether the device is a AMBA device. Thanks, but it needs at least a user to show the conversion. I think I suggested in the last discussion to convert all straightforward cases (which are not the direct users of the given bus type).
On Mon, Sep 23, 2024 at 02:11:40PM +0300, Andy Shevchenko wrote: > On Mon, Sep 23, 2024 at 05:42:47PM +0800, Kunwu Chan wrote: > > Add dev_is_amba() function to determine > > whether the device is a AMBA device. > > Thanks, but it needs at least a user to show the conversion. > I think I suggested in the last discussion to convert all > straightforward cases (which are not the direct users of the > given bus type). Okay, I see now, I was only Cc'ed to the first in the series... Scratch that comment then, sorry for the noise.
On Mon, Sep 23, 2024 at 05:42:47PM +0800, Kunwu Chan wrote: > Add dev_is_amba() function to determine > whether the device is a AMBA device. > > Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > Signed-off-by: Kunwu Chan <chentao@kylinos.cn> > --- > drivers/amba/bus.c | 6 ++++++ > include/linux/amba/bus.h | 5 +++++ > 2 files changed, 11 insertions(+) Russell, Can I get an ack for this to take it with patch #2. Rob
On Tue, Sep 24, 2024 at 05:28:57PM -0500, Rob Herring wrote: > On Mon, Sep 23, 2024 at 05:42:47PM +0800, Kunwu Chan wrote: > > Add dev_is_amba() function to determine > > whether the device is a AMBA device. > > > > Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > > Signed-off-by: Kunwu Chan <chentao@kylinos.cn> > > --- > > drivers/amba/bus.c | 6 ++++++ > > include/linux/amba/bus.h | 5 +++++ > > 2 files changed, 11 insertions(+) > > Russell, Can I get an ack for this to take it with patch #2. Would be nice to discuss "how shall we merge this cross-subsystem patch series" first, hmm? The reason I didn't take patch 1 originally is because it was submitted to me without any users, and the general principle is not to accept patches without users. Too many times, I've merged code where there's been a "promise" that it will be used, only to have the author go silent and users never come along. So now, my rule is... any code that adds something must also come with its user.
Thanks for the reply. On 2024/9/25 06:43, Russell King (Oracle) wrote: > On Tue, Sep 24, 2024 at 05:28:57PM -0500, Rob Herring wrote: >> On Mon, Sep 23, 2024 at 05:42:47PM +0800, Kunwu Chan wrote: >>> Add dev_is_amba() function to determine >>> whether the device is a AMBA device. >>> >>> Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> >>> Signed-off-by: Kunwu Chan <chentao@kylinos.cn> >>> --- >>> drivers/amba/bus.c | 6 ++++++ >>> include/linux/amba/bus.h | 5 +++++ >>> 2 files changed, 11 insertions(+) >> Russell, Can I get an ack for this to take it with patch #2. > Would be nice to discuss "how shall we merge this cross-subsystem > patch series" first, hmm? > > The reason I didn't take patch 1 originally is because it was submitted > to me without any users, and the general principle is not to accept > patches without users. Too many times, I've merged code where there's > been a "promise" that it will be used, only to have the author go > silent and users never come along. So now, my rule is... any code that > adds something must also come with its user. > Just one user in drivers/of/platform.c right now. Actually, I don't know if dev_is_amba will use it more in the future. So we keep the usage of "dev->bus == &platform_bus_type " too? Although here come a wrapper function "dev_is_platform".
On Tue, Sep 24, 2024 at 5:44 PM Russell King (Oracle) <linux@armlinux.org.uk> wrote: > > On Tue, Sep 24, 2024 at 05:28:57PM -0500, Rob Herring wrote: > > On Mon, Sep 23, 2024 at 05:42:47PM +0800, Kunwu Chan wrote: > > > Add dev_is_amba() function to determine > > > whether the device is a AMBA device. > > > > > > Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > > > Signed-off-by: Kunwu Chan <chentao@kylinos.cn> > > > --- > > > drivers/amba/bus.c | 6 ++++++ > > > include/linux/amba/bus.h | 5 +++++ > > > 2 files changed, 11 insertions(+) > > > > Russell, Can I get an ack for this to take it with patch #2. > > Would be nice to discuss "how shall we merge this cross-subsystem > patch series" first, hmm? Sure. IMO and what seems to be typical, since the user is in drivers/of/ and changing that code is the overall reason for this series, I think merging it via the DT tree makes the most sense. But either way is fine with me. I'm happy to either ack it or apply it and move on to the next thing. > The reason I didn't take patch 1 originally is because it was submitted > to me without any users, and the general principle is not to accept > patches without users. Too many times, I've merged code where there's > been a "promise" that it will be used, only to have the author go > silent and users never come along. So now, my rule is... any code that > adds something must also come with its user. The user is in drivers/of/ in patch 2 of this series. So no issue there. Rob
Add dev_is_amba function and use dev_is_platform()/dev_is_amba() instead of checking bus type directly. Kunwu Chan (2): amba: Add dev_is_amba() function and export it for modules of/platform: PCI: Use dev_is_platform/dev_is_amba to identify platform/amba devices drivers/amba/bus.c | 6 ++++++ drivers/of/platform.c | 4 ++-- include/linux/amba/bus.h | 5 +++++ 3 files changed, 13 insertions(+), 2 deletions(-)