mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Johan Hovold <johan@kernel.org>, Thomas Gleixner <tglx@linutronix.de>
Cc: 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, 5 Nov 2025 14:32:18 +0100	[thread overview]
Message-ID: <7ad2b976-3b0d-4823-a145-ceedf071450d@linaro.org> (raw)
In-Reply-To: <20251017054943.7195-1-johan@kernel.org>


Hi Johan,

thanks for your fix.

You should replace __init by __init_or_module


On 10/17/25 07:49, Johan Hovold wrote:
> Platform drivers can be probed after their init sections have been
> discarded (e.g. on probe deferral or manual rebind through sysfs) so the
> probe function must not live in init. Device managed resource actions
> similarly cannot be discarded.
> 
> The "_probe" suffix of the driver structure name prevents modpost from
> warning about this so replace it to catch any similar future issues.
> 
> Fixes: cec32ac75827 ("clocksource/drivers/nxp-timer: Add the System Timer Module for the s32gx platforms")
> Cc: stable@vger.kernel.org	# 6.16
> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> Signed-off-by: Johan Hovold <johan@kernel.org>
> ---
>   drivers/clocksource/timer-nxp-stm.c | 18 +++++++++---------
>   1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/clocksource/timer-nxp-stm.c b/drivers/clocksource/timer-nxp-stm.c
> index bbc40623728f..ce10bdcfc76b 100644
> --- a/drivers/clocksource/timer-nxp-stm.c
> +++ b/drivers/clocksource/timer-nxp-stm.c
> @@ -177,15 +177,15 @@ static void nxp_stm_clocksource_resume(struct clocksource *cs)
>   	nxp_stm_clocksource_enable(cs);
>   }
>   
> -static void __init devm_clocksource_unregister(void *data)
> +static void devm_clocksource_unregister(void *data)
>   {
>   	struct stm_timer *stm_timer = data;
>   
>   	clocksource_unregister(&stm_timer->cs);
>   }
>   
> -static int __init nxp_stm_clocksource_init(struct device *dev, struct stm_timer *stm_timer,
> -					   const char *name, void __iomem *base, struct clk *clk)
> +static int nxp_stm_clocksource_init(struct device *dev, struct stm_timer *stm_timer,
> +				    const char *name, void __iomem *base, struct clk *clk)
>   {
>   	int ret;
>   
> @@ -298,9 +298,9 @@ static void nxp_stm_clockevent_resume(struct clock_event_device *ced)
>   	nxp_stm_module_get(stm_timer);
>   }
>   
> -static int __init nxp_stm_clockevent_per_cpu_init(struct device *dev, struct stm_timer *stm_timer,
> -						  const char *name, void __iomem *base, int irq,
> -						  struct clk *clk, int cpu)
> +static int nxp_stm_clockevent_per_cpu_init(struct device *dev, struct stm_timer *stm_timer,
> +					   const char *name, void __iomem *base, int irq,
> +					   struct clk *clk, int cpu)
>   {
>   	stm_timer->base = base;
>   	stm_timer->rate = clk_get_rate(clk);
> @@ -388,7 +388,7 @@ static irqreturn_t nxp_stm_module_interrupt(int irq, void *dev_id)
>   	return IRQ_HANDLED;
>   }
>   
> -static int __init nxp_stm_timer_probe(struct platform_device *pdev)
> +static int nxp_stm_timer_probe(struct platform_device *pdev)
>   {
>   	struct stm_timer *stm_timer;
>   	struct device *dev = &pdev->dev;
> @@ -484,14 +484,14 @@ static const struct of_device_id nxp_stm_of_match[] = {
>   };
>   MODULE_DEVICE_TABLE(of, nxp_stm_of_match);
>   
> -static struct platform_driver nxp_stm_probe = {
> +static struct platform_driver nxp_stm_driver = {
>   	.probe	= nxp_stm_timer_probe,
>   	.driver	= {
>   		.name		= "nxp-stm",
>   		.of_match_table	= nxp_stm_of_match,
>   	},
>   };
> -module_platform_driver(nxp_stm_probe);
> +module_platform_driver(nxp_stm_driver);
>   
>   MODULE_DESCRIPTION("NXP System Timer Module driver");
>   MODULE_LICENSE("GPL");


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

  parent reply	other threads:[~2025-11-05 13:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-17  5:49 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 [this message]
2025-11-10 14:51   ` Johan Hovold
2025-11-12  9:57     ` Daniel Lezcano
2025-11-12 10:58       ` Johan Hovold
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=7ad2b976-3b0d-4823-a145-ceedf071450d@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=alexandre.torgue@foss.st.com \
    --cc=johan@kernel.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

all inboxes | Powered by JetHome®