From: Tom Rini Date: Fri, 17 Jul 2020 16:58:56 -0400 Subject: [PATCH] mtd: mtdpart: use uint64_t instead of int for cur_off In-Reply-To: <20200713124002.20882-1-martin.kaistra@linutronix.de> References: <20200713124002.20882-1-martin.kaistra@linutronix.de> Message-ID: <20200717205856.GH6227@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Jul 13, 2020 at 02:40:02PM +0200, Martin Kaistra wrote: > The types of "offset" and "size" of "struct mtd_partition" are uint64_t, > while mtd_parse_partitions() uses int to work with these values. When > the offset reaches 2GB, it is interpreted as a negative value, which > leads to error messages like > > mtd: partition "" is out of reach -- disabled > > eg. when using the "ubi part" command. > > Fix this by using uint64_t for cur_off and cur_sz. > > Signed-off-by: Martin Kaistra > Reviewed-by: Kurt Kanzenbach > Reviewed-by: Heiko Schocher Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: