From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Wed, 22 May 2019 07:21:32 -0600 Subject: [U-Boot] [PATCH] core: ofnode: Have ofnode_read_u32_default return a u32 In-Reply-To: <20190510174810.4990-1-tpiepho@impinj.com> References: <20190510174810.4990-1-tpiepho@impinj.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, 10 May 2019 at 11:48, Trent Piepho wrote: > > It was returning an int, which doesn't work if the u32 it is reading, > or the default value, will overflow a signed int. > > While it could be made to work, when using a C standard/compiler where > casting negative signed values to unsigned has a defined behavior, > combined with careful casting, it seems obvious one is meant to use > ofnode_read_s32_default() with signed values. > > Cc: Simon Glass > Signed-off-by: Trent Piepho > --- > drivers/core/ofnode.c | 2 +- > include/dm/ofnode.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) Applied to u-boot-dm, thanks!