mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Miaohe Lin <linmiaohe@huawei.com>
To: <miquel.raynal@bootlin.com>, <richard@nod.at>, <vigneshr@ti.com>
Cc: <David.Woodhouse@intel.com>, <Artem.Bityutskiy@nokia.com>,
	<ext-adrian.hunter@nokia.com>, <linux-kernel@vger.kernel.org>,
	<linux-mtd@lists.infradead.org>, <linmiaohe@huawei.com>,
	<linfeilong@huawei.com>
Subject: [PATCH] mtd: fix size in mtd_info_user to support 64-bit
Date: Thu, 8 Jul 2021 21:13:59 +0800	[thread overview]
Message-ID: <20210708131359.21591-1-linmiaohe@huawei.com> (raw)

From: Feilong Lin <linfeilong@huawei.com>

The size in struct mtd_info_user is 32-bit, which will cause errors
when obtaining the size of large-capacity MTD devices, such as TLC
NAND FLASH-2048Gb.

Fixes: 69423d99fc18 ("[MTD] update internal API to support 64-bit device size")
Signed-off-by: Feilong Lin <linfeilong@huawei.com>
---
 include/uapi/mtd/mtd-abi.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/uapi/mtd/mtd-abi.h b/include/uapi/mtd/mtd-abi.h
index b869990c2db2..efe0b53b10c1 100644
--- a/include/uapi/mtd/mtd-abi.h
+++ b/include/uapi/mtd/mtd-abi.h
@@ -128,7 +128,7 @@ struct mtd_write_req {
 struct mtd_info_user {
 	__u8 type;
 	__u32 flags;
-	__u32 size;	/* Total size of the MTD */
+	__u64 size;	/* Total size of the MTD */
 	__u32 erasesize;
 	__u32 writesize;
 	__u32 oobsize;	/* Amount of OOB data per block (e.g. 16) */
-- 
2.23.0


             reply	other threads:[~2021-07-08 13:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-08 13:13 Miaohe Lin [this message]
2021-07-15 23:02 ` Miquel Raynal
2021-07-16  1:42   ` Miaohe Lin
2021-07-16  9:48     ` Miquel Raynal
2021-07-16 13:34       ` Rob Landley
2021-07-17  1:55         ` Miaohe Lin
2021-07-22  8:47         ` Rob Landley

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=20210708131359.21591-1-linmiaohe@huawei.com \
    --to=linmiaohe@huawei.com \
    --cc=Artem.Bityutskiy@nokia.com \
    --cc=David.Woodhouse@intel.com \
    --cc=ext-adrian.hunter@nokia.com \
    --cc=linfeilong@huawei.com \
    --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

all inboxes | Powered by JetHome®