From: Michal Simek <michal.simek@amd.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] clocksource/drivers/timer-cadence-ttc: fix a signedness bug in probe()
Date: Tue, 6 Jun 2023 11:26:20 +0200 [thread overview]
Message-ID: <0cc62a35-8dcc-01ad-8db1-e9a1ee2f4e4b@amd.com> (raw)
In-Reply-To: <ZH7rMgjh+z3TUKGu@moroto>
On 6/6/23 10:15, Dan Carpenter wrote:
> Make the "irq" variable signed so the error handling can work.
urq_of_parse_and_map returns unsigned type.
include/linux/of_irq.h:118:extern unsigned int irq_of_parse_and_map(struct
device_node *node, int index);
instead of this condition should be fixed to
irq = irq_of_parse_and_map(timer, 1);
if (!irq) {
...
>
> Fixes: e932900a3279 ("arm: zynq: Use standard timer binding")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> From static analysis. Untested. Presumably if probe fails the system
> is unbootable so I didn't bother looking at the resource leaks.
In the way how systems with TTC are used today that's correct assumption.
But just to be accurate system can also have different timers which could be
used instead.
Thanks,
Michal
next prev parent reply other threads:[~2023-06-06 9:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-06 8:15 [PATCH] clocksource/drivers/timer-cadence-ttc: fix a signedness bug in probe() Dan Carpenter
2023-06-06 9:26 ` Michal Simek [this message]
2023-06-06 9:39 ` Dan Carpenter
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=0cc62a35-8dcc-01ad-8db1-e9a1ee2f4e4b@amd.com \
--to=michal.simek@amd.com \
--cc=dan.carpenter@linaro.org \
--cc=daniel.lezcano@linaro.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@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