mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Walleij <linusw@kernel.org>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Liu Dalin <liudalin@kylinsec.com.cn>,
	Dan Carpenter <error27@gmail.com>,
	 Hans Ulli Kroll <ulli.kroll@googlemail.com>,
	linux-arm-kernel@lists.infradead.org,  linux-rtc@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	 Deng Yingchao <dengyingchao@kylinsec.com.cn>,
	Qin Yungao <qinyungao@kylinsec.com.cn>,
	 Luo Qiu <luoqiu@kylinsec.com.cn>
Subject: Re: [PATCH] rtc: ftrtc010: fix negative offset handling and smatch warning
Date: Thu, 8 Oct 2026 15:07:23 +0200	[thread overview]
Message-ID: <CAD++jLkshbEFS0-H__3AFJiRMeS0hA5F8PoqUjB7kyG_cvRkTw@mail.gmail.com> (raw)
In-Reply-To: <20261008115913bfd12cb4@mail.local>

On Thu, Oct 8, 2026 at 1:59 PM Alexandre Belloni
<alexandre.belloni@bootlin.com> wrote:
> On 08/10/2026 19:37:32+0800, Liu Dalin wrote:

> > A prior attempted to fix the 32-bit arithmetic overflow by turning
> > the implicit u32-to-timeu64_t cast into an explicit one. However,
> > all calculations still happen in u32, inheriting the existing
> > negative offset sign-extension bug, and the explicit cast triggers
> > smatch "cast after binop" warning.
> >
>
> AI is lying to you, offset will never ever be negative.

This looks like something that warrants a clause in:
https://github.com/masoncl/review-prompts/tree/main/kernel/subsystem
in a new rtc.md

I added a file for gpio after some insane review ideas
from Sashiko, hopefully it takes effect.

Yours,
Linus Walleij

      parent reply	other threads:[~2026-10-08 13:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-08 11:37 Liu Dalin
2026-10-08 11:59 ` Alexandre Belloni
2026-10-08 12:24   ` liudalin
2026-10-08 13:07   ` Linus Walleij [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=CAD++jLkshbEFS0-H__3AFJiRMeS0hA5F8PoqUjB7kyG_cvRkTw@mail.gmail.com \
    --to=linusw@kernel.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=dengyingchao@kylinsec.com.cn \
    --cc=error27@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=liudalin@kylinsec.com.cn \
    --cc=luoqiu@kylinsec.com.cn \
    --cc=qinyungao@kylinsec.com.cn \
    --cc=ulli.kroll@googlemail.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®