From patchwork Fri May 13 20:24:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 1630947 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=teR7D4s8; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4L0Ksb538Nz9sFk for ; Sat, 14 May 2022 06:25:53 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A4E1E83AF6; Fri, 13 May 2022 22:25:41 +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="teR7D4s8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 31CC68300B; Fri, 13 May 2022 22:25:40 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 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 8E8FE83C05 for ; Fri, 13 May 2022 22:25:37 +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=pali@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 30984B83177; Fri, 13 May 2022 20:25:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C77B1C34100; Fri, 13 May 2022 20:25:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652473536; bh=xO/jEzIJ80pDQnMk+2mp8mTCeUQBl8ufTvsGZSV9DB0=; h=From:To:Cc:Subject:Date:From; b=teR7D4s8n+snlAYBxegMSTL2jCC3jUmODdQCehG2y1Zq7PtoiB2GWj0SBqNzwpnrN 7DwTjioKYqKbT16SFafF4UHa5KU3QWLtlK9Q24q/DuVsyDiO+1ogjZPs0kAW3Bk3yv O9bVl0pd95uKEc4RtnMYb4s6640sgTOQ7bZLf6Zt1w7c/l97mKAXC1HvGMwW1dMxy1 EzZnNPwLt5phb9SnuJPTxbLiKRPVRB4eDL2pJUjHqbD5zPr+anIAARU8V/JEz2dGww 4aXGiZNyL3U069Y/+ct1FsALiKczeVLrpLffqgDBclGPy+c8Dd4YiSXY2fkSih3Fd7 bQOBWBeYp/qcQ== Received: by pali.im (Postfix) id E6D512B90; Fri, 13 May 2022 22:25:32 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: =?utf-8?q?Marek_Beh=C3=BAn?= , Heinrich Schuchardt , Jagan Teki , Simon Glass Cc: u-boot@lists.denx.de Subject: [PATCH] mtd: mtdpart: Change size type from fdt_addr_t to fdt_size_t Date: Fri, 13 May 2022 22:24:51 +0200 Message-Id: <20220513202451.3283-1-pali@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 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.5 at phobos.denx.de X-Virus-Status: Clean Set correct type for 3rd argument of ofnode_get_addr_size_index_notrans() function. It expects fdt_size_t * and not fdt_addr_t *. When these two types do not have same size then U-Boot throw compile warning: drivers/mtd/mtdpart.c: In function ‘add_mtd_partitions_of’: drivers/mtd/mtdpart.c:906:57: warning: passing argument 3 of ‘ofnode_get_addr_size_index_notrans’ from incompatible pointer type [-Wincompatible-pointer-types] offset = ofnode_get_addr_size_index_notrans(child, 0, &size); ^~~~~ In file included from include/dm/device.h:13, from include/linux/mtd/mtd.h:26, from include/ubi_uboot.h:28, from drivers/mtd/mtdpart.c:27: include/dm/ofnode.h:530:25: note: expected ‘fdt_size_t *’ {aka ‘long long unsigned int *’} but argument is of type ‘fdt_addr_t *’ {aka ‘long unsigned int *’} fdt_size_t *size); ~~~~~~~~~~~~^~~~ Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- drivers/mtd/mtdpart.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c index 4119ea4ff6b0..adc0515730d5 100644 --- a/drivers/mtd/mtdpart.c +++ b/drivers/mtd/mtdpart.c @@ -898,7 +898,8 @@ int add_mtd_partitions_of(struct mtd_info *master) ofnode_for_each_subnode(child, parts) { struct mtd_partition part = { 0 }; struct mtd_info *slave; - fdt_addr_t offset, size; + fdt_addr_t offset; + fdt_size_t size; if (!ofnode_is_available(child)) continue;