From: Tom Rini Date: Wed, 2 Dec 2020 16:22:45 -0500 Subject: [PATCH 03/10] setexpr: Add explicit support for 32- and 64-bit ints In-Reply-To: <20201101211544.3579850-4-sjg@chromium.org> References: <20201101211544.3579850-1-sjg@chromium.org> <20201101211544.3579850-4-sjg@chromium.org> Message-ID: <20201202212245.GX32272@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 Sun, Nov 01, 2020 at 02:15:37PM -0700, Simon Glass wrote: > At present this function assumes that a size of 4 refers to a ulong. This > is true on 32-bit machines but not commonly on 64-bit machines. > > This means that the 'l' specify does not work correctly with setexpr. > > Add an explicit case for 32-bit values so that 64-bit machines can still > use the 'l' specifier. On 32-bit machines, 64-bit is still not supported. > > This corrects the operation of the default size (which is 4 for setexpr), > so update the tests accordingly. > > The original code for reading from memory was included in 47ab5ad1457 > ("cmd_setexpr: allow memory addresses in expressions") but I am not adding > a Fixes: tag since that code was not written with 64-bit machines in mind. > > Signed-off-by: Simon Glass Applied to u-boot/next, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: