From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 09576C433F5 for ; Tue, 11 Oct 2022 11:51:16 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3638484EFD; Tue, 11 Oct 2022 13:50:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="Jg+NjZOy"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CBC8384EE8; Tue, 11 Oct 2022 13:50:39 +0200 (CEST) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E047584EFD for ; Tue, 11 Oct 2022 13:50:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=rogerq@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8203CB815A0; Tue, 11 Oct 2022 11:50:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB2B7C433D7; Tue, 11 Oct 2022 11:50:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665489034; bh=I5LFsERWGT64S2HFl4wGdC2dW49JLUE5mzPeS5XGNjU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jg+NjZOykgbng6GkdZwGbjAqmCHoEWG7XgbBj+SRJFg5qoKv1ZbGOtNSVSKeaFkyA eesEStko719Vd7cgxWaFBwfrD3uxnjZp0hL9donc57MrLXWt7+6m0r8LyvYFEZkD3u E5ReC1lPa3O0nrxtBbhzmnWz/0cQCH2YMiYjsI6PYFUWr3I0yxwF00162qTqsYJZ1y zY22EtLATj2tgAPEwrfBuZrn4/BiUaXsEtppaUXJJF2Ig6aWEwNTg6+4+xlgdCltNU JqWnN+dPBoKR9ZLAVfrny0NckRNqPjVIQkj1tciQI7lbTPADVMeoeePSAqbpv8Pof7 53eOxG19NqwcQ== From: Roger Quadros To: dario.binacchi@amarulasolutions.com, michael@amarulasolutions.com, trini@konsulko.com Cc: u-boot@lists.denx.de, Roger Quadros Subject: [u-boot][PATCH 03/14] mtd: rawnand: omap_gpmc: Fix build warning on 64-bit platforms Date: Tue, 11 Oct 2022 14:50:01 +0300 Message-Id: <20221011115012.6181-4-rogerq@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221011115012.6181-1-rogerq@kernel.org> References: <20221011115012.6181-1-rogerq@kernel.org> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Pointer size cannot be assumed to be 32-bit, so use use uintptr_t instead of uint32_t. Fixes the below build warning on 64-bit builds. drivers/mtd/nand/raw/omap_gpmc.c:439:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] head = ((uint32_t) buf) % 4; Signed-off-by: Roger Quadros --- drivers/mtd/nand/raw/omap_gpmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw/omap_gpmc.c b/drivers/mtd/nand/raw/omap_gpmc.c index 7e9ccf7878..d62c3e6fce 100644 --- a/drivers/mtd/nand/raw/omap_gpmc.c +++ b/drivers/mtd/nand/raw/omap_gpmc.c @@ -438,14 +438,14 @@ static inline void omap_nand_read(struct mtd_info *mtd, uint8_t *buf, int len) static void omap_nand_read_prefetch(struct mtd_info *mtd, uint8_t *buf, int len) { int ret; - uint32_t head, tail; + uintptr_t head, tail; struct nand_chip *chip = mtd_to_nand(mtd); /* * If the destination buffer is unaligned, start with reading * the overlap byte-wise. */ - head = ((uint32_t) buf) % 4; + head = ((uintptr_t)buf) % 4; if (head) { omap_nand_read(mtd, buf, head); buf += head; -- 2.17.1