All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Caleb James DeLisle" <cjd@cjdns.fr>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v10 4/5] clocksource/timer-econet-en751221: Support EN751627 without percpu IRQ
Date: Thu, 15 Oct 2026 15:41:44 +0000	[thread overview]
Message-ID: <sashiko-outbox-173087@kernel.org> (raw)
In-Reply-To: <20261015145331.453837-5-cjd@cjdns.fr>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] timer-econet-en751221: garbled log for skipped CPUs
--

commit 8c35e9425e27c43766e858db0613c5a5ed00f531
Author: Caleb James DeLisle <cjd@cjdns.fr>

clocksource/timer-econet-en751221: Support EN751627 without percpu IRQ

This commit adds support for the EN751627 CPU timer, which uses a different
interrupt number for each CPU timer instead of a single percpu interrupt.

> diff --git a/drivers/clocksource/timer-econet-en751221.c b/drivers/clocksource/timer-econet-en751221.c
> index f2c4c1ee0a56b..ebcc6fa342189 100644
> --- a/drivers/clocksource/timer-econet-en751221.c
> +++ b/drivers/clocksource/timer-econet-en751221.c
[ ... ]
> @@ -102,6 +104,25 @@ static int cevt_init_cpu(uint cpu)
>  	struct clock_event_device *cd = &per_cpu(econet_timer_pcpu, cpu);
>  	u32 reg;
>  
> +	if (!reg_ctl(cpu)) {
> +		pr_err("%s: missing address resource for CPU %d\n", cd->name,
> +		       cpu);

[Severity: Low]
Can cd->name be NULL here, resulting in a garbled "(null)" log message?

If a system has more possible CPUs than available IRQs and is not
using the is_percpu configuration, cevt_init() skips initializing the clock
event device for those extra CPUs:

    cevt_init() {
        ...
        for_each_possible_cpu(i) {
            ...
            if (!econet_timer.is_percpu && i >= econet_timer.num_irqs)
                continue;
            ...
            cd->name = np->name;
        }
    }

Although hotplug is unsupported, cpuhp_setup_state() is still called
during initialization and invokes cevt_init_cpu() for online CPUs. If
the topology happens to report more possible CPUs than available IRQs,
those CPUs will fail these early checks and pass the uninitialized cd->name
to pr_err().

> +		return -EINVAL;
> +	}
> +	if (cd->irq <= 0) {
> +		pr_err("%s: missing IRQ for CPU %d\n", cd->name, cpu);

[Severity: Low]
Similarly, could cd->name be uninitialized here for skipped CPUs?

> +		return -EINVAL;
> +	}
[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261015145331.453837-1-cjd@cjdns.fr?part=4

  reply	other threads:[~2026-10-15 15:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-15 14:53 [PATCH v10 0/5] clocksource/timer-econet-en751221: Support irq number per timer Caleb James DeLisle
2026-10-15 14:53 ` [PATCH v10 1/5] dt-bindings: timer: econet: Update EN751627 for multi-IRQ Caleb James DeLisle
2026-10-15 14:53 ` [PATCH v10 2/5] clocksource/timer-econet-en751221: Init teardown on error if possible Caleb James DeLisle
2026-10-15 14:53 ` [PATCH v10 3/5] clocksource/timer-econet-en751221: Disable IRQ until cevt registered Caleb James DeLisle
2026-10-15 14:53 ` [PATCH v10 4/5] clocksource/timer-econet-en751221: Support EN751627 without percpu IRQ Caleb James DeLisle
2026-10-15 15:41   ` sashiko-bot [this message]
2026-10-15 15:53     ` Caleb James DeLisle
2026-10-15 14:53 ` [PATCH v10 5/5] clocksource/timer-econet-en751221: Do not use NR_CPUS for resource array size Caleb James DeLisle

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=sashiko-outbox-173087@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=cjd@cjdns.fr \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.