linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] amba: Drop builtin_amba_driver()
@ 2022-05-17  6:29 Anshuman Khandual
  2022-05-18 12:20 ` Arnd Bergmann
  0 siblings, 1 reply; 4+ messages in thread
From: Anshuman Khandual @ 2022-05-17  6:29 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Anshuman Khandual, Catalin Marinas, Will Deacon, Russell King,
	Wang Kefeng, Arnd Bergmann, linux-kernel

Drop builtin_amba_driver() which is not used anymore.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Wang Kefeng <wangkefeng.wang@huawei.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
---
This applies on v5.18-rc7

 include/linux/amba/bus.h | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h
index 6562f543c3e0..7c5d2aa73437 100644
--- a/include/linux/amba/bus.h
+++ b/include/linux/amba/bus.h
@@ -171,14 +171,4 @@ struct amba_device name##_device = {				\
  */
 #define module_amba_driver(__amba_drv) \
 	module_driver(__amba_drv, amba_driver_register, amba_driver_unregister)
-
-/*
- * builtin_amba_driver() - Helper macro for drivers that don't do anything
- * special in driver initcall.  This eliminates a lot of boilerplate.  Each
- * driver may only use this macro once, and calling it replaces the instance
- * device_initcall().
- */
-#define builtin_amba_driver(__amba_drv) \
-	builtin_driver(__amba_drv, amba_driver_register)
-
 #endif
-- 
2.20.1


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

* Re: [PATCH] amba: Drop builtin_amba_driver()
  2022-05-17  6:29 [PATCH] amba: Drop builtin_amba_driver() Anshuman Khandual
@ 2022-05-18 12:20 ` Arnd Bergmann
  2022-05-19  3:08   ` Anshuman Khandual
  0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2022-05-18 12:20 UTC (permalink / raw)
  To: Anshuman Khandual
  Cc: Linux ARM, Catalin Marinas, Will Deacon, Russell King,
	Wang Kefeng, Arnd Bergmann, Linux Kernel Mailing List

On Tue, May 17, 2022 at 7:29 AM Anshuman Khandual
<anshuman.khandual@arm.com> wrote:
>
> Drop builtin_amba_driver() which is not used anymore.

The patch looks correct, but I don't see the purpose. Are you trying
to discourage
having amba drivers as built-in? Otherwise the next time we get an amba
driver that cannot be a loadable module, someone might want to add back the
same macro.

        Arnd

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

* Re: [PATCH] amba: Drop builtin_amba_driver()
  2022-05-18 12:20 ` Arnd Bergmann
@ 2022-05-19  3:08   ` Anshuman Khandual
  2022-05-19 10:53     ` Arnd Bergmann
  0 siblings, 1 reply; 4+ messages in thread
From: Anshuman Khandual @ 2022-05-19  3:08 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Linux ARM, Catalin Marinas, Will Deacon, Russell King,
	Wang Kefeng, Linux Kernel Mailing List



On 5/18/22 17:50, Arnd Bergmann wrote:
> On Tue, May 17, 2022 at 7:29 AM Anshuman Khandual
> <anshuman.khandual@arm.com> wrote:
>>
>> Drop builtin_amba_driver() which is not used anymore.
> 
> The patch looks correct, but I don't see the purpose. Are you trying
> to discourage
> having amba drivers as built-in? Otherwise the next time we get an amba
> driver that cannot be a loadable module, someone might want to add back the
> same macro.

Right, then it should be added back. But for now this is just dead code
and not being used, hence why keep it ?

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

* Re: [PATCH] amba: Drop builtin_amba_driver()
  2022-05-19  3:08   ` Anshuman Khandual
@ 2022-05-19 10:53     ` Arnd Bergmann
  0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2022-05-19 10:53 UTC (permalink / raw)
  To: Anshuman Khandual
  Cc: Arnd Bergmann, Linux ARM, Catalin Marinas, Will Deacon,
	Russell King, Wang Kefeng, Linux Kernel Mailing List

On Thu, May 19, 2022 at 4:08 AM Anshuman Khandual
<anshuman.khandual@arm.com> wrote:
> On 5/18/22 17:50, Arnd Bergmann wrote:
> > On Tue, May 17, 2022 at 7:29 AM Anshuman Khandual
> > <anshuman.khandual@arm.com> wrote:
> >>
> >> Drop builtin_amba_driver() which is not used anymore.
> >
> > The patch looks correct, but I don't see the purpose. Are you trying
> > to discourage
> > having amba drivers as built-in? Otherwise the next time we get an amba
> > driver that cannot be a loadable module, someone might want to add back the
> > same macro.
>
> Right, then it should be added back. But for now this is just dead code
> and not being used, hence why keep it ?

I don't care if the function is there or not, the interface does exactly what
one expects it to do, and it uses no space in the binary, but most likely
nobody would miss it if it's gone.

However, neither adding nor removing the function by itself to me hits the
threshold of doing a meaningful change that is an overall improvement, so
why send a patch?

The original patch that added the function was similar: the coresight drivers
were written to be loadable modules but Kconfig forced them to be built-in,
so Paul's cleanup to remove the module bits felt like completely pointless
churn that just made it harder for Kim to make them modular again.

If you want to remove the macro out of spite for the original change,
I'm sympathetic with that, but then put this in the patch description ;-)

        Arnd

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

end of thread, other threads:[~2022-05-19 10:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-17  6:29 [PATCH] amba: Drop builtin_amba_driver() Anshuman Khandual
2022-05-18 12:20 ` Arnd Bergmann
2022-05-19  3:08   ` Anshuman Khandual
2022-05-19 10:53     ` Arnd Bergmann

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