From: Xianwei Zhao <xianwei.zhao@amlogic.com>
To: Colin Ian King <colin.i.king@gmail.com>,
Sunny Luo <sunny.luo@amlogic.com>,
Mark Brown <broonie@kernel.org>,
linux-amlogic@lists.infradead.org, linux-spi@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] spi: SPISG: Fix less than zero comparison on a u32 variable
Date: Mon, 28 Jul 2025 10:13:12 +0800 [thread overview]
Message-ID: <bd920227-5ec9-43dc-bbd1-03276e5edf7c@amlogic.com> (raw)
In-Reply-To: <20250725171701.839927-1-colin.i.king@gmail.com>
Reviewed-by: Xianwei Zhao <xianwei.zhao@amlogic.com>
On 2025/7/26 01:17, Colin Ian King wrote:
> [Some people who received this message don't often get email from colin.i.king@gmail.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> [ EXTERNAL EMAIL ]
>
> The check for ns < 0 is always false because variable ns is a u32 which
> is not a signed type. Fix this by making ns a s32 type.
>
> Fixes: cef9991e04ae ("spi: Add Amlogic SPISG driver")
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
> drivers/spi/spi-amlogic-spisg.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/spi/spi-amlogic-spisg.c b/drivers/spi/spi-amlogic-spisg.c
> index 48a5325b4db7..2ab8bdf2a676 100644
> --- a/drivers/spi/spi-amlogic-spisg.c
> +++ b/drivers/spi/spi-amlogic-spisg.c
> @@ -163,7 +163,7 @@ struct spisg_device {
>
> static int spi_delay_to_sclk(u32 slck_speed_hz, struct spi_delay *delay)
> {
> - u32 ns;
> + s32 ns;
>
> if (!delay)
> return 0;
> --
> 2.50.0
>
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
prev parent reply other threads:[~2025-07-28 2:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-25 17:17 Colin Ian King
2025-07-25 22:14 ` Mark Brown
2025-07-28 2:13 ` Xianwei Zhao [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=bd920227-5ec9-43dc-bbd1-03276e5edf7c@amlogic.com \
--to=xianwei.zhao@amlogic.com \
--cc=broonie@kernel.org \
--cc=colin.i.king@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=sunny.luo@amlogic.com \
/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®