The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Anthony Iliopoulos <ailiop@suse.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>,
	Rich Felker <dalias@libc.org>,
	John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
	linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sh: remove unused setup_profiling_timer function
Date: Fri, 21 Aug 2026 11:51:42 +0200	[thread overview]
Message-ID: <aogfrl6URpwMKxsk@technoir> (raw)
In-Reply-To: <CAMuHMdUxpgiMSgjcR2-Vz33iYUrjBNKO29yXk8oEdXG6RLFRtg@mail.gmail.com>

On Fri, Aug 21, 2026 at 09:36:46AM +0200, Geert Uytterhoeven wrote:
> Hi Anthony,
> 
> Thanks for your patch!
> 
> On Fri, 21 Aug 2026 at 09:27, Anthony Iliopoulos <ailiop@suse.com> 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 <ailiop@suse.com>
> 
> > --- 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

Thanks for the review, yes the plan was to also remove the call entirely
from profile code itself, so that the resetting functionality can remain
and the arch-specific stubs could be dropped. I should clearly have sent
that patch first. I just did it now:

https://lore.kernel.org/all/20260821091744.91496-1-ailiop@suse.com/

Regards,
Anthony

      reply	other threads:[~2026-08-21  9:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-20 12:39 [PATCH] sh: remove unused setup_profiling_timer function Anthony Iliopoulos
2026-08-20 14:00 ` John Paul Adrian Glaubitz
2026-08-21  9:41   ` Anthony Iliopoulos
2026-08-21 13:15   ` Geert Uytterhoeven
2026-08-21  7:36 ` Geert Uytterhoeven
2026-08-21  9:51   ` Anthony Iliopoulos [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aogfrl6URpwMKxsk@technoir \
    --to=ailiop@suse.com \
    --cc=dalias@libc.org \
    --cc=geert@linux-m68k.org \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=ysato@users.sourceforge.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox