public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] clocksource/drivers/stm: Fix section mismatches
Date: Wed, 12 Nov 2025 11:58:03 +0100	[thread overview]
Message-ID: <aRRoO5mXbH9eg0fE@hovoldconsulting.com> (raw)
In-Reply-To: <3c2dee38-46a8-4359-b981-d4e3d53061fe@linaro.org>

On Wed, Nov 12, 2025 at 10:57:21AM +0100, Daniel Lezcano wrote:
> On 11/10/25 15:51, Johan Hovold wrote:

> > On Wed, Nov 05, 2025 at 02:32:18PM +0100, Daniel Lezcano wrote:
> > 
> >> You should replace __init by __init_or_module
> > 
> > That's not sufficient as the driver can still be rebound through sysfs
> > currently (the driver would probably crash anyway, but that's a separate
> > issue).
> > 
> > Also note that no drivers use __init_or_module these days, likely as
> > everyone uses modules and it's not worth the added complexity in trying
> > to get the section markers right for a build configuration that few
> > people care about.
> > 
> > I can send a follow-on patch to suppress the unbind attribute, or
> > include it in a v2 if you insist on using __init_or_module.
> > 
> > What do you prefer?
> 
> I think it makes sens to use __init_or_module because these drivers have 
> been always compiled in and we are converting them into modules.

That's not really relevant. __init_or_module will only save a tiny bit
of memory in builds where modules are completely disabled
(i.e. !CONFIG_MODULES) which is hardly used any more.

Note that it has nothing to do with whether this particular driver is
built as a module or not.

And since no other drivers cares about this uncommon case, are you sure
you want to do this here?

Note that this would also require suppressing section mismatch warnings
for the common case (CONFIG_MODULES).

Johan

  reply	other threads:[~2025-11-12 10:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-17  5:49 [PATCH] clocksource/drivers/stm: Fix section mismatches Johan Hovold
2025-10-20  9:32 ` Johan Hovold
2025-10-20  9:39   ` Greg KH
2025-10-20  9:44     ` Johan Hovold
2025-11-05 13:32 ` Daniel Lezcano
2025-11-10 14:51   ` Johan Hovold
2025-11-12  9:57     ` Daniel Lezcano
2025-11-12 10:58       ` Johan Hovold [this message]
2025-11-12 15:22 ` Daniel Lezcano
2025-11-26 14:40 ` [tip: timers/clocksource] clocksource/drivers/nxp-stm: " tip-bot2 for Johan Hovold

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=aRRoO5mXbH9eg0fE@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=alexandre.torgue@foss.st.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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