From patchwork Thu Feb 27 13:56:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 1245867 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=prevas.dk Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.a=rsa-sha256 header.s=selector1 header.b=bCI5Oi8+; dkim-atps=neutral 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 (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48SvNb2G0cz9shj for ; Fri, 28 Feb 2020 00:56:46 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C1A6380857; Thu, 27 Feb 2020 14:56:21 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.b="bCI5Oi8+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0B7E98089D; Thu, 27 Feb 2020 14:56:17 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FORGED_SPF_HELO, SPF_HELO_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0713.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe1e::713]) (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 1D16B8050F for ; Thu, 27 Feb 2020 14:56:14 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=rasmus.villemoes@prevas.dk ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U15juBhF1QSJytv93+jsHNeUtCIl3Vf3TqeybBYk/6cyGHnH3pvr2OacF8He/emZBldTGRPYX4YTbpBsGl1kNpfv2P7DyNLdHh+/C0s15GKF+uhiUWvGAh/nqSHnAYHQAlTgmOKCxJ3hedtQh1B89UQEX8mv1PLtqSDs0EFvQH9hLw6F2idmwr89v5c/6SK1XiCTXKtPJ++cHJcHs4R8CCKwhi6eNS2gNU/e5/A0bJkjV2brepMWiJFLcTJ2Vy1bAaCGT7JM3AGtbBoVTfiDGqgD4o6BMVRVQ8V01C1Lr9Sgls2626YkiS6DD1nVPDvoMKPDGke13xNrHw5Asp3D3g== 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-SenderADCheck; bh=hBy+wlrx8IYGIoS1pDt+KRx2IPkAdHFd9SeZ7Fp+7Sw=; b=oa1ZV/sGzyiZPv/zorLuDJEKO5Q2WAVomF9nOpvWSF6GDL7+UiHvnhl6/EA4hk1U7MMwFjdvHKDfUubMXS8AC6ieN+k4PqLN4gzuDFW0/x6CODLBYC0qEb1t4Op/NopGXNLfHHirASCYN4pwNH/RR0D+VayGiqGR9ahWCu5ftdzxw3PbPciKwq8c2KNj6pUOH74T+X/ZbBvIPe+whnc/wDB8mTz95ROT+62HXqQKyrWTRwLWrazwcoPokNpuIzorGqvDALJK1j+fjrAiKoPjRBUPpAKXnouCTGwIY7rb/aPrFPXind/5JmzG/iPGYfjcNGB4yY0gQmIVBDJUQgbJIg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=prevas.dk; dmarc=pass action=none header.from=prevas.dk; dkim=pass header.d=prevas.dk; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=prevas.dk; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hBy+wlrx8IYGIoS1pDt+KRx2IPkAdHFd9SeZ7Fp+7Sw=; b=bCI5Oi8+xY7R1qA++Ph7zT2P3BxQRd0Re7otLW4HjrE/MW0L3v18VtUjbGNAVAXklCstwxRQsgtmQW1lRFjhvBGzAKbs3Hl5+KXIc+lPaIARRhc7kuH3CNx2nDK8g+q1ZkcxYVC8oHLCNUegGL+LpzUx0v5FudXrihw92moAf+A= Received: from VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM (20.178.126.85) by VI1PR10MB3183.EURPRD10.PROD.OUTLOOK.COM (52.133.244.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.14; Thu, 27 Feb 2020 13:56:10 +0000 Received: from VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM ([fe80::e58f:1097:b71d:32c7]) by VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM ([fe80::e58f:1097:b71d:32c7%5]) with mapi id 15.20.2772.012; Thu, 27 Feb 2020 13:56:10 +0000 Received: from prevas-ravi.prevas.se (5.186.115.35) by AM5P194CA0007.EURP194.PROD.OUTLOOK.COM (2603:10a6:203:8f::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.14 via Frontend Transport; Thu, 27 Feb 2020 13:56:09 +0000 From: Rasmus Villemoes To: "u-boot@lists.denx.de" CC: Wolfgang Denk , Simon Glass , Joe Hershberger , Rasmus Villemoes Subject: [PATCH 1/4] env: remove callback.o for an SPL build Thread-Topic: [PATCH 1/4] env: remove callback.o for an SPL build Thread-Index: AQHV7XWqCTIW3lOuE0mK79mGJ4Z8RA== Date: Thu, 27 Feb 2020 13:56:10 +0000 Message-ID: <20200227135600.28853-2-rasmus.villemoes@prevas.dk> References: <20200227135600.28853-1-rasmus.villemoes@prevas.dk> In-Reply-To: <20200227135600.28853-1-rasmus.villemoes@prevas.dk> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM5P194CA0007.EURP194.PROD.OUTLOOK.COM (2603:10a6:203:8f::17) To VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:803:e1::21) x-mailer: git-send-email 2.23.0 authentication-results: spf=none (sender IP is ) smtp.mailfrom=rasmus.villemoes@prevas.dk; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [5.186.115.35] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6b58fcb2-ca92-4946-1cc0-08d7bb8cccc8 x-ms-traffictypediagnostic: VI1PR10MB3183: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2399; x-forefront-prvs: 03264AEA72 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(366004)(396003)(376002)(346002)(39840400004)(136003)(199004)(189003)(5660300002)(64756008)(2616005)(6666004)(66446008)(8976002)(66556008)(956004)(66946007)(6506007)(66476007)(2906002)(54906003)(71200400001)(8936002)(44832011)(107886003)(86362001)(6486002)(6512007)(186003)(36756003)(8676002)(26005)(81156014)(81166006)(316002)(1076003)(16526019)(478600001)(4326008)(52116002)(6916009); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR10MB3183; H:VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: prevas.dk does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: lrEG9V0/aYcPRTnm3aMsHPwO/Wkd7RqIn2MsVUTquYsrMdUEaez+Gndh+2DZO0p0fCk8jmdWSNvXoZTJKTmabFBgttPjM3rk+wqjZNTbcbXjdBYfWfXhEk/G9QLIDGwZnaEB+Vym2lEMHOSR1JVl02MGz7w+XA3UOq5SThGXcXe/7dO73wpJVjgwCHEs6E0rAU1Ta/rmVl73+O2Kr2qZUdiBOG6iVBb7QKuPvraUFKERir6D6+PlZ1YfQ7wWgeaKzqGkgS8SLzOuhsTbTqMqqyPjdsvtc+KdvkT7povCJEldHcke/77pTDyv35up8nbePs7xz3FGd1kDdv7rOah9VG0dqhIqIqO/tl8+c8V/J+xHkRzFZc6b+Zf6JFVBwIzdMy6mv5Hj4E5xsETjic/uxFXEOEBGrRFqZ6KHZmS0k4AcDH7zhBEkHrCHziifMPaI x-ms-exchange-antispam-messagedata: TAnA32/xGUNTqDhbwD65GfMx5BdrllAwXIphbGimIyJn7b7WC7UcT0L8zx94Luj5C4I8CQ9PDOEjrR3FRerHZmgaDa8C1srMs5ypxto4dWD0icpgI2NxfRaicjJEJ4/SJn2zNhDhhTuQA+OmRVbW7g== MIME-Version: 1.0 X-OriginatorOrg: prevas.dk X-MS-Exchange-CrossTenant-Network-Message-Id: 6b58fcb2-ca92-4946-1cc0-08d7bb8cccc8 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Feb 2020 13:56:10.3285 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: d350cf71-778d-4780-88f5-071a4cb1ed61 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: VZRLo/Z3LcvL/fql2GqQx1Wr6ZH5kaM5TGQvcJbOQ6NpWbUB5CzOEtkcK0ws9sfIq2/XVweT4mLsxGiwaos0j5kyVM1bLfoAarjmq2+B+dI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR10MB3183 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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.102.2 at phobos.denx.de X-Virus-Status: Clean env.h says this about about callback declarations (U_BOOT_ENV_CALLBACK): * For SPL these are silently dropped to reduce code size, since environment * callbacks are not supported with SPL. So env_callback_init() does a lot of work to not find anything in the guaranteed empty env_clbk list. Drop callback.o entirely from the link and stub out the only public function defined in callback.o. This cuts about 600 bytes from the SPL on my ppc build. Signed-off-by: Rasmus Villemoes Reviewed-by: Simon Glass --- env/Makefile | 2 +- include/env_callback.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/env/Makefile b/env/Makefile index e2a165b8f1..c4ad654328 100644 --- a/env/Makefile +++ b/env/Makefile @@ -7,9 +7,9 @@ obj-$(CONFIG_$(SPL_TPL_)ENV_SUPPORT) += common.o obj-$(CONFIG_$(SPL_TPL_)ENV_SUPPORT) += env.o obj-$(CONFIG_$(SPL_TPL_)ENV_SUPPORT) += attr.o obj-$(CONFIG_$(SPL_TPL_)ENV_SUPPORT) += flags.o -obj-$(CONFIG_$(SPL_TPL_)ENV_SUPPORT) += callback.o ifndef CONFIG_SPL_BUILD +obj-y += callback.o obj-$(CONFIG_ENV_IS_IN_EEPROM) += eeprom.o extra-$(CONFIG_ENV_IS_EMBEDDED) += embedded.o obj-$(CONFIG_ENV_IS_IN_EEPROM) += embedded.o diff --git a/include/env_callback.h b/include/env_callback.h index 74da20eec3..05e9516a0f 100644 --- a/include/env_callback.h +++ b/include/env_callback.h @@ -72,6 +72,12 @@ "serial#:serialno," \ CONFIG_ENV_CALLBACK_LIST_STATIC +#ifndef CONFIG_SPL_BUILD void env_callback_init(struct env_entry *var_entry); +#else +static inline void env_callback_init(struct env_entry *var_entry) +{ +} +#endif #endif /* __ENV_CALLBACK_H__ */