From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Ivan Stepchenko <sid@itb.spb.ru>
Cc: Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
David Woodhouse <David.Woodhouse@intel.com>,
Jared Hulbert <jaredeh@gmail.com>,
Alexey Korolev <akorolev@infradead.org>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
lvc-project@linuxtesting.com
Subject: Re: [PATCH] mtd: lpddr_cmds: fix signed shifts in lpddr_cmds
Date: Sat, 29 Nov 2025 13:51:24 +0100 [thread overview]
Message-ID: <176442068453.77093.14391627489442582650.b4-ty@bootlin.com> (raw)
In-Reply-To: <20251121115446.11421-1-sid@itb.spb.ru>
On Fri, 21 Nov 2025 14:54:46 +0300, Ivan Stepchenko wrote:
> There are several places where a value of type 'int' is shifted by
> lpddr->chipshift. lpddr->chipshift is derived from QINFO geometry and
> might reach 31 when QINFO reports a 2 GiB size - the maximum supported by
> LPDDR(1) compliant chips. This may cause unexpected sign-extensions when
> casting the integer value to the type of 'unsigned long'.
>
> Use '1UL << lpddr->chipshift' and cast 'j' to unsigned long before
> shifting so the computation is performed at the destination width.
>
> [...]
Applied to mtd/next, thanks!
[1/1] mtd: lpddr_cmds: fix signed shifts in lpddr_cmds
commit: c909fec69f84b39e63876c69b9df2c178c6b76ba
Patche(s) should be available on mtd/linux.git and will be
part of the next PR (provided that no robot complains by then).
Kind regards,
Miquèl
prev parent reply other threads:[~2025-11-29 12:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-21 11:54 Ivan Stepchenko
2025-11-29 12:51 ` Miquel Raynal [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=176442068453.77093.14391627489442582650.b4-ty@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=David.Woodhouse@intel.com \
--cc=akorolev@infradead.org \
--cc=jaredeh@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=lvc-project@linuxtesting.com \
--cc=richard@nod.at \
--cc=sid@itb.spb.ru \
--cc=vigneshr@ti.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®