linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] smpboot: remove duplicate inline keyword
@ 2021-07-23  9:16 Arnd Bergmann
  2021-07-23 15:27 ` Valentin Schneider
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2021-07-23  9:16 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Arnd Bergmann, Peter Zijlstra, Valentin Schneider, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

'static inline void __always_inline' is one more 'inline' than needed,
and it's in the wrong place as gcc points out when extra warnings
are enabled:

kernel/smpboot.c:50:1: error: 'inline' is not at beginning of declaration [-Werror=old-style-declaration]
   50 | static inline void __always_inline idle_init(unsigned int cpu)

Move it to the right place instead.

Fixes: e9ba16e68cce ("smpboot: Mark idle_init() as __always_inlined to work around aggressive compiler un-inlining")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 kernel/smpboot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/smpboot.c b/kernel/smpboot.c
index 21b7953f8242..cf6acab78538 100644
--- a/kernel/smpboot.c
+++ b/kernel/smpboot.c
@@ -47,7 +47,7 @@ void __init idle_thread_set_boot_cpu(void)
  *
  * Creates the thread if it does not exist.
  */
-static inline void __always_inline idle_init(unsigned int cpu)
+static __always_inline void idle_init(unsigned int cpu)
 {
 	struct task_struct *tsk = per_cpu(idle_threads, cpu);
 
-- 
2.29.2


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

* Re: [PATCH] smpboot: remove duplicate inline keyword
  2021-07-23  9:16 [PATCH] smpboot: remove duplicate inline keyword Arnd Bergmann
@ 2021-07-23 15:27 ` Valentin Schneider
  0 siblings, 0 replies; 2+ messages in thread
From: Valentin Schneider @ 2021-07-23 15:27 UTC (permalink / raw)
  To: Arnd Bergmann, Ingo Molnar; +Cc: Arnd Bergmann, Peter Zijlstra, linux-kernel


Hi,

On 23/07/21 11:16, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> 'static inline void __always_inline' is one more 'inline' than needed,
> and it's in the wrong place as gcc points out when extra warnings
> are enabled:
>
> kernel/smpboot.c:50:1: error: 'inline' is not at beginning of declaration [-Werror=old-style-declaration]
>    50 | static inline void __always_inline idle_init(unsigned int cpu)
>
> Move it to the right place instead.
>
> Fixes: e9ba16e68cce ("smpboot: Mark idle_init() as __always_inlined to work around aggressive compiler un-inlining")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Colin sent a similar fix at:

  http://lore.kernel.org/r/20210715164018.62712-1-colin.king@canonical.com

Now AFAICT the incriminated patch is in tip/core/urgent and
linux-next/master, but not in the current mainline. If so, this could be
fixed up before it gets pulled.

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

end of thread, other threads:[~2021-07-23 15:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-23  9:16 [PATCH] smpboot: remove duplicate inline keyword Arnd Bergmann
2021-07-23 15:27 ` Valentin Schneider

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