From: Randy Dunlap <rdunlap@infradead.org>
To: Daniel Golle <daniel@makrotopia.org>,
Richard Weinberger <richard@nod.at>,
Zhihao Cheng <chengzhihao1@huawei.com>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Vignesh Raghavendra <vigneshr@ti.com>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] mtd: ubi: fix NVMEM over UBI volumes on 32-bit systems
Date: Wed, 28 Feb 2024 22:01:16 -0800 [thread overview]
Message-ID: <d47a817f-11c0-429c-8e9c-9ab0dfa17388@infradead.org> (raw)
In-Reply-To: <ff29447dcee834c17e4e1e99725b9454c90136ca.1709178325.git.daniel@makrotopia.org>
On 2/28/24 19:47, Daniel Golle wrote:
> A compiler warning related to sizeof(int) != 8 when calling do_div()
> is triggered when building on 32-bit platforms.
> Address this by using integer types having a well-defined size.
>
> Fixes: 3ce485803da1 ("mtd: ubi: provide NVMEM layer over UBI volumes")
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
> ---
> v3: use size_t also for 'to_read' variable to avoid truncation
> (no problem in practise beyond the compiler warning)
> v2: use size_t for 'bytes_left' variable to match parameter type
>
> drivers/mtd/ubi/nvmem.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
Works for me. Thanks.
Tested-by: Randy Dunlap <rdunlap@infradead.org>
--
#Randy
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
prev parent reply other threads:[~2024-02-29 6:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-29 3:47 [PATCH v3] mtd: ubi: fix NVMEM over UBI volumes on 32-bit systems Daniel Golle
2024-02-29 4:04 ` Zhihao Cheng
2024-02-29 6:01 ` Randy Dunlap [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=d47a817f-11c0-429c-8e9c-9ab0dfa17388@infradead.org \
--to=rdunlap@infradead.org \
--cc=chengzhihao1@huawei.com \
--cc=daniel@makrotopia.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).