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 4DDFCC54EE9 for ; Sun, 11 Sep 2022 16:12:27 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 038EB84BB0; Sun, 11 Sep 2022 18:11:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.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=gmail.com header.i=@gmail.com header.b="Yy7xjPVy"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7D95A84B85; Sun, 11 Sep 2022 18:11:09 +0200 (CEST) Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1D8F684BA0 for ; Sun, 11 Sep 2022 18:11:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ovpanait@gmail.com Received: by mail-wr1-x432.google.com with SMTP id bq9so11678480wrb.4 for ; Sun, 11 Sep 2022 09:11:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=46+wDB1giJ8bzV+nRHElfvYIQF2QS2Vn7NvD29N//0Y=; b=Yy7xjPVyRPfwkznVtPzJvYOqFVePnY3igsbElVUMmW8JNIpsemESQuPTLaNArT0bFV Dm3FQ3+Gn/XytOGTPofzTA6hItMFTNpajc2joSYnKMF7yDxm1r0S6944pJS1WUrUzJsR Oui9aXb/No4DTK7Iy78Czk67EXZgHGKMuN4u/gDBdVYRa3zVdRfqgmOJ7YF13xGyA4FG lS1rTZpzeHG3TO2o4kBoQ7ly/PVJIBYJo6beDWrtvTDtx0g8RLZmgX2j8/Xa8IXlNeIA 3iukpF8s29aMixgsJ9AriZu+evwPaP/l/iZs7AtPmmu8PKzT2SrMzvoBbYrUoFogX9v6 Fctg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=46+wDB1giJ8bzV+nRHElfvYIQF2QS2Vn7NvD29N//0Y=; b=AR86jA6+WfcY5ODt8F+chU4tpez5dzKtriCFW7IMrgf4Nmv21Z0T2NPqnZch22QNmQ HJguyP6t0oI3AX6r7+kp7Yam1zCaXZnBJrAzVZnNil5F54BIsBcQECEsPzficrKxN1td 4joUTBhEuEp4TXPfyh5c3ns9b3MqKWhtzDXGwVQxABBlOnwv6oOtKJbWlQa5zid2wY5C JYCiCvtS8p3BvsB9Y8CYfjRBfeTU2F3pHBD2If4OhRCLXn+vOAvo1hD9Gly1xBIjkeOX zNWHjrzYqDq3n1G060k9byzVCnQE44TFmtn72/Zvrvpru4pgCO/T115O2TVmjlK1FLqP 8JLQ== X-Gm-Message-State: ACgBeo0TldQV6zPhQhOZn50vElTeIq+gkFwfl6LHann5l70xnO0H3OXx xvZbtHc49OhH7tJEdl+QOT35gFnGMXI= X-Google-Smtp-Source: AA6agR4Xxfapb4FuMd3T/u/1TsDMBqsczKGyvmuuhL77H7fxE7gRJyxlxoiXufMaTWinTV5qu8+kmg== X-Received: by 2002:a05:6000:178a:b0:22a:2c1d:f563 with SMTP id e10-20020a056000178a00b0022a2c1df563mr10172377wrg.384.1662912659523; Sun, 11 Sep 2022 09:10:59 -0700 (PDT) Received: from localhost.localdomain ([2a02:2f07:610e:db00:f58e:2331:88f2:f78b]) by smtp.gmail.com with ESMTPSA id h8-20020a05600c350800b003a608d69a64sm7446779wmq.21.2022.09.11.09.10.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Sep 2022 09:10:59 -0700 (PDT) From: Ovidiu Panait To: u-boot@lists.denx.de Cc: Ovidiu Panait , Holger Brunck , Marek Vasut , Michal Simek , Rick Chen , Simon Glass , Wolfgang Denk Subject: [PATCH 1/4] common/board_f: remove XTRN_DECLARE_GLOBAL_DATA_PTR dead code Date: Sun, 11 Sep 2022 19:10:48 +0300 Message-Id: <20220911161052.2986264-1-ovpanait@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 The XTRN_DECLARE_GLOBAL_DATA_PTR declarations in ppc code are permanently commented out, so there are no users for this macro: #if 1 #define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("r2") #else #define XTRN_DECLARE_GLOBAL_DATA_PTR extern #define DECLARE_GLOBAL_DATA_PTR XTRN_DECLARE_GLOBAL_DATA_PTR \ gd_t *gd #endif Remove all references. Signed-off-by: Ovidiu Panait --- arch/powerpc/include/asm/global_data.h | 6 ------ common/board_f.c | 11 ----------- 2 files changed, 17 deletions(-) diff --git a/arch/powerpc/include/asm/global_data.h b/arch/powerpc/include/asm/global_data.h index 6709e692e6..6ed21c781f 100644 --- a/arch/powerpc/include/asm/global_data.h +++ b/arch/powerpc/include/asm/global_data.h @@ -92,12 +92,6 @@ struct arch_global_data { #include -#if 1 #define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("r2") -#else /* We could use plain global data, but the resulting code is bigger */ -#define XTRN_DECLARE_GLOBAL_DATA_PTR extern -#define DECLARE_GLOBAL_DATA_PTR XTRN_DECLARE_GLOBAL_DATA_PTR \ - gd_t *gd -#endif #endif /* __ASM_GBL_DATA_H */ diff --git a/common/board_f.c b/common/board_f.c index 18e2246733..f4238d4c90 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -57,18 +57,7 @@ #include #include -/* - * Pointer to initial global data area - * - * Here we initialize it if needed. - */ -#ifdef XTRN_DECLARE_GLOBAL_DATA_PTR -#undef XTRN_DECLARE_GLOBAL_DATA_PTR -#define XTRN_DECLARE_GLOBAL_DATA_PTR /* empty = allocate here */ -DECLARE_GLOBAL_DATA_PTR = (gd_t *)(CONFIG_SYS_INIT_GD_ADDR); -#else DECLARE_GLOBAL_DATA_PTR; -#endif /* * TODO(sjg@chromium.org): IMO this code should be -- 2.25.1