From: Simon Glass Date: Mon, 16 Jan 2017 07:03:41 -0700 Subject: [U-Boot] [PATCH v3 16/62] x86: fsp: Fix cast for 64-bit compilation In-Reply-To: <20170116140427.29283-1-sjg@chromium.org> References: <20170116140427.29283-1-sjg@chromium.org> Message-ID: <20170116140427.29283-17-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Fix a cast in get_next_hob() that causes warnings on 64-bit machines. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- Changes in v3: None Changes in v2: - Fix cast in get_guid_hob_data() also arch/x86/include/asm/fsp/fsp_hob.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/fsp/fsp_hob.h b/arch/x86/include/asm/fsp/fsp_hob.h index 3fb3546e27f..7c22bcd5cd8 100644 --- a/arch/x86/include/asm/fsp/fsp_hob.h +++ b/arch/x86/include/asm/fsp/fsp_hob.h @@ -139,7 +139,7 @@ struct hob_guid { */ static inline const struct hob_header *get_next_hob(const struct hob_header *hdr) { - return (const struct hob_header *)((u32)hdr + hdr->len); + return (const struct hob_header *)((uintptr_t)hdr + hdr->len); } /** @@ -172,7 +172,7 @@ static inline bool end_of_hob(const struct hob_header *hdr) */ static inline void *get_guid_hob_data(const struct hob_header *hdr) { - return (void *)((u32)hdr + sizeof(struct hob_guid)); + return (void *)((uintptr_t)hdr + sizeof(struct hob_guid)); } /** -- 2.11.0.483.g087da7b7c-goog