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 B6232C433F5 for ; Wed, 9 Feb 2022 17:01:48 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B400583E93; Wed, 9 Feb 2022 18:01:45 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=softathome.com 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=softathome1.onmicrosoft.com header.i=@softathome1.onmicrosoft.com header.b="eMCDLKPn"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DEB9D83E97; Wed, 9 Feb 2022 18:01:43 +0100 (CET) Received: from FRA01-PR2-obe.outbound.protection.outlook.com (mail-pr2fra01on060d.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e18::60d]) (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 D99B483E8E for ; Wed, 9 Feb 2022 18:01:39 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=softathome.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=philippe.reynes@softathome.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M8GzxNTkDGjd08GnIiE7Z66M82LTg7lHNSCioHqWY55Hr8PbQMmU4R/81OFUDXDP/ppwmD4eGgW1+2eK5CDd4BkTGlHSwUktv9xtFhVDb8oOeMUQq6I+//EX9ULEKZJmCTQ3dlf5NtIh6cNJAsIvRBvSb+nKLnuhU5E+UCeTjlubZCv+jqXNEm3xWnXBlWqJFaErgzYlJPHhFlvNyyO7wyO2T74o0XaMOFcHDXeCVa6PV4N+WyfDripyWhei+3DzJpeeP6gvg/qpp+yAAHeIopN5m5owVtbLJAWY2B0/rlv/sTLjw6f7gzLxbVY9AJZ9Mb2Na2EUIZdKyvuCDzUdyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=EZWOSh9PgW13qtpbRuLQdQXsv7D6uN23MrqvsYMQg9A=; b=RLdISZnu+5tM7JvL8kBJSnLwKk+5F1oQXgNvX8GeUN5I2iP8Krz2NEDOirziLO11oY7dNJTPAQcyH6BhMuGhn11cIE7bcOKpCv4FgtONsO84hl2M+y8n/krFVCiH5IsIFhu7BaPm62tO6n13JgKFHg58/cVTvR4L5K3CcKWpwoZ0PMEiG/8ADNfYFYyhtcHC3a5c8uIzUcqLMZCntjTj3cCRqCNgwooYsENP+0lHLOWbuDNUlYRWVdEZGqxcKHW/SdKQJSnoUjzGWHEGFUP+W05mwTMGTCVdQ/ZuqYPNSn9dAPS1iuDUdd2GS2HLc+mS9sGFbcwNO7K2PIYQgGTXRA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.6.166.170) smtp.rcpttodomain=chromium.org smtp.mailfrom=softathome.com; dmarc=bestguesspass action=none header.from=softathome.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=softathome1.onmicrosoft.com; s=selector1-softathome1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EZWOSh9PgW13qtpbRuLQdQXsv7D6uN23MrqvsYMQg9A=; b=eMCDLKPnwKpODxav7ZAyyUC+uxPIYEiJIxviuwVeJf3EUoUZd0UlHj4adTTlpDMQVqdzh2zGNq5ulIhlowSKdAs3uAAPBIgwsHiHH+VLZsjEYY7HKnq60njcbWO79+0Fgrrb4px6aSwZur/bFGc7bsWY3b+Ci77A9v0KIPS4mofIF9GJ1PviQLzMgP0YBhol/E91jNf9iA4M+M8DF1hy2WBP3qNPxCsQ//MVO2Q9iuVgHCxA7UJWxs3Ixdd7wwEXsrk5+AlUndn+j110fE4vljYkUHfkLS9rCjYklAQSbcNsuIF1qhYlUwHV5Gzf8e6f9vWqttPLd0Gd93kJ9UOJUA== Received: from MR2P264CA0158.FRAP264.PROD.OUTLOOK.COM (2603:10a6:501:1::21) by PR0P264MB0475.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:a::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12; Wed, 9 Feb 2022 17:01:38 +0000 Received: from MR2FRA01FT008.eop-fra01.prod.protection.outlook.com (2603:10a6:501:1:cafe::3b) by MR2P264CA0158.outlook.office365.com (2603:10a6:501:1::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12 via Frontend Transport; Wed, 9 Feb 2022 17:01:38 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.6.166.170) smtp.mailfrom=softathome.com; dkim=none (message not signed) header.d=none;dmarc=bestguesspass action=none header.from=softathome.com; Received-SPF: Pass (protection.outlook.com: domain of softathome.com designates 149.6.166.170 as permitted sender) receiver=protection.outlook.com; client-ip=149.6.166.170; helo=proxy.softathome.com; Received: from proxy.softathome.com (149.6.166.170) by MR2FRA01FT008.mail.protection.outlook.com (10.152.50.193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11 via Frontend Transport; Wed, 9 Feb 2022 17:01:37 +0000 Received: from sah1lpt571.softathome.com (unknown [192.168.75.67]) by proxy.softathome.com (Postfix) with ESMTPSA id 86B2F1FDC2; Wed, 9 Feb 2022 18:01:37 +0100 (CET) From: Philippe Reynes To: sjg@chromium.org, jneuhauser@dh-electronics.com Cc: u-boot@lists.denx.de, Philippe Reynes Subject: [PATCH] scripts: dtc: libfdt: fdt_ro.c: always define fdt_check_full Date: Wed, 9 Feb 2022 18:01:24 +0100 Message-Id: <20220209170124.31578-1-philippe.reynes@softathome.com> X-Mailer: git-send-email 2.17.1 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: f826f3d2-82e0-425e-1341-08d9ebedd5ef X-MS-TrafficTypeDiagnostic: PR0P264MB0475:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3513; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tSuDPD7BSe4iIR7gUoyK6porTLhCd0VvxcQfEaZUCHQEXlbT0kRZvRyCU/c14OwTj2D9mP/5z1rr3qYbIV7Tjz92V0J7pLN6/EXLDwNFMRD46fOZDNSh8Vn9Gjpy+RO9V9Kv7G0kPOknGkaL/sp1WRf3HhwhsotQutIBINDkoiqzL1VZ3J2FcBhOBdUkuH17lZIMWWAx/n3rQ7dzmGAc1h47stAQ4n4zTOnmM+JjWyFINiRYcKyFmo2ahOOSTdNCyVbNxm59Flo0w+4ab7i5/Tqpx3n7x4BmEVeeTxXYQIR26gHgACd2+oBWKnjXCk1jwKrw3VhraQzlsqTjy5cdcVZVonoUNX08SV2HynVQc4+O5LRfJvPfoS+vn/zvc4Jbgosj+ERX5hgsAGWP4RX7btP6ulG2cWd98RUXwshUUd6c1A4g0D32UwgVccoRqXZZv5tUt2Xhzx2tbOwpEVLlUF1sGP0lbi69kC/MiMbKi2kxqPpHVHWI0gNjKKAOPDA8DqerYNJ3wZLaz9TL2vojtdDvHxrc2KiOe2AWXiAMRgYxXZ8hrryiOKSHQvklsOS/GHIq3cFCtixFTI66SNqDmxxIuMoyvZJxBF9/GK4M996db/LMMQg6bSlyysePKVBFmURYSRoXcfrpTeuTq+IMBhZzP7Ron8UbjeO/W7kPMX/pjIzBfvZ4BHLDF3wZVA6DVOISTFKvddL1fM9IYPSAAQ== X-Forefront-Antispam-Report: CIP:149.6.166.170; CTRY:FR; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:proxy.softathome.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230001)(4636009)(36840700001)(46966006)(40470700004)(1076003)(82960400001)(86362001)(316002)(508600001)(82310400004)(47076005)(81166007)(40460700003)(356005)(36860700001)(6666004)(44832011)(7696005)(2906002)(4326008)(83380400001)(26005)(107886003)(186003)(8676002)(5660300002)(2616005)(6966003)(70206006)(36756003)(336012)(426003)(8936002)(6266002)(70586007)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: softathome.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Feb 2022 17:01:37.8002 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f826f3d2-82e0-425e-1341-08d9ebedd5ef X-MS-Exchange-CrossTenant-Id: aa10e044-e405-4c10-8353-36b4d0cce511 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=aa10e044-e405-4c10-8353-36b4d0cce511; Ip=[149.6.166.170]; Helo=[proxy.softathome.com] X-MS-Exchange-CrossTenant-AuthSource: MR2FRA01FT008.eop-fra01.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR0P264MB0475 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 On some configs (like stm32mp15_dhcom_basic_defconfig), if configs SPL_LOAD_FIT_FULL and SPL_FIT_FULL_CHECK are enabled. Then the compilatio fails with the following error: arm-linux-gnueabi-ld.bfd: boot/image-fit.o: in function `fit_check_format': /uboot/u-boot-stm/boot/image-fit.c:1641: undefined reference to `fdt_check_full' scripts/Makefile.spl:509: recipe for target 'spl/u-boot-spl' failed This issue happens because the function fdt_check_full is only defined if "!defined(FDT_ASSUME_MASK) || FDT_ASSUME_MASK != 0xff". But this function may be called even if this condition are not verified. To avoid this issue, the function fdt_check_full is always defined. Signed-off-by: Philippe Reynes --- scripts/dtc/libfdt/fdt_ro.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/dtc/libfdt/fdt_ro.c b/scripts/dtc/libfdt/fdt_ro.c index efe7efe921..63eaf57f43 100644 --- a/scripts/dtc/libfdt/fdt_ro.c +++ b/scripts/dtc/libfdt/fdt_ro.c @@ -937,4 +937,10 @@ int fdt_check_full(const void *fdt, size_t bufsize) } } } -#endif +#else +int fdt_check_full(const void __always_unused *fdt, + size_t __always_unused bufsize) +{ + return 0; +} +#endif /* #if !defined(FDT_ASSUME_MASK) || FDT_ASSUME_MASK != 0xff */ -- 2.17.1