Re: [PATCH] sh: remove unused setup_profiling_timer function
Geert Uytterhoeven <[email protected]>
| Newsgroups | org.kernel.vger.linux-sh,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <CAMuHMdUxpgiMSgjcR2-Vz33iYUrjBNKO29yXk8oEdXG6RLFRtg@mail.gmail.com> |
Hi Anthony, Thanks for your patch! On Fri, 21 Aug 2026 at 09:27, Anthony Iliopoulos <[email protected]> wrote: > setup_profiling_timer() is not used by any code at this point. Since a It is used in write_profile() https://elixir.bootlin.com/linux/v7.2/source/kernel/profile.c#L202 > default weak implementation exists, there is no need to keep this > arch-specific definition around. Remove it along with the now-redundant > profile header includes. > > Signed-off-by: Anthony Iliopoulos <[email protected]> > --- a/arch/sh/kernel/smp.c > +++ b/arch/sh/kernel/smp.c > @@ -21,7 +21,6 @@ > #include <linux/sched/hotplug.h> > #include <linux/atomic.h> > #include <linux/clockchips.h> > -#include <linux/profile.h> > > #include <asm/processor.h> > #include <asm/mmu_context.h> > @@ -322,14 +321,6 @@ void smp_message_recv(unsigned int msg) > } > } > > -#ifdef CONFIG_PROFILING > -/* Not really SMP stuff ... */ > -int setup_profiling_timer(unsigned int multiplier) > -{ > - return 0; This returns zero (success), while the default weak implementation returns -EINVAL, so your change breaks write_profile(). https://elixir.bootlin.com/linux/v7.2/source/kernel/profile.c#L181 > -} > -#endif > - > #ifdef CONFIG_MMU > > static void flush_tlb_all_ipi(void *info) Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds