Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp692702ybp; Fri, 4 Oct 2019 03:30:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqyfM+7+HO6Jtbv8HI5N4JxD/HMstCR4TOSgxvZWr1NndzBq5N0cc4/8Q60PvVZPb8NmIMeC X-Received: by 2002:a50:fa09:: with SMTP id b9mr14429184edq.165.1570185017966; Fri, 04 Oct 2019 03:30:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570185017; cv=none; d=google.com; s=arc-20160816; b=x1zo5m/FX9i8UCwuBi3pgYazFrUr0rtj+rn36Wk9rf9EWY7JNjzzlTOFSY/n9DcLV1 3ja5d6Qavyxs7ipsVT2KLTpNn2kSJVBdamRGWl20wr/QJPen/HREnVOcYTRfwWUEu7UY JVnqFNyuNJCbf0Pn958qf+Q26vJ7bOCplvSfXB0eN+z5/nm8vbw11AxGpBw+Jkvn+1LZ c3/c6cjUjOky1IOYnlEqWe4jYdWjBRrFSJ+4Ve6w362lF9V3GkeHaApEuD8QClJJzNVm 35Mv/sZLpxT6ZdbhuFHjwi1ER68JyhjltvjJIlGMqldkDQEnY35K1LJvVWWhlIov/CXy MZmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=zwueem1EPljcXnRaD27ju0e/9VU20MKGGmsIv6bb3i0=; b=ZukIJZYCZPb+wxcSWkY2WmV2Z+9hy5lK+hjUIi0Ny53CtRYieOBXTb7aDJ6ew6mK4g Hsrke7fdIL0UiyYixuzKnhLC43DGw4d3fNnXKN48O6K3Bb2xJ6s7aYuLUg1F323vmJ/a /KBT3ykGEX4yKLSqrs98B9qDQ7CH5u4kgoscETLphPBE/amlx3xdpnxKVFCY13ISXCaX suUTG3bdwpNIWfoDClDcc287rdIH//hYG6i8M6mAGaz9ooHRxTFnrECsQzfBL+96bRf6 b7Sw/pRMRUS6Ue2Or/xwXyBHseIzl7gn4xZoFsUPz9x8g/a9QuYlzlwHyBe7M2vyVzfG 11DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b="b+mFR/U2"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t49si3419372edd.198.2019.10.04.03.29.53; Fri, 04 Oct 2019 03:30:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b="b+mFR/U2"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730146AbfJDJsc (ORCPT + 99 others); Fri, 4 Oct 2019 05:48:32 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:35555 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727451AbfJDJsc (ORCPT ); Fri, 4 Oct 2019 05:48:32 -0400 Received: by mail-lj1-f195.google.com with SMTP id m7so5850641lji.2 for ; Fri, 04 Oct 2019 02:48:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zwueem1EPljcXnRaD27ju0e/9VU20MKGGmsIv6bb3i0=; b=b+mFR/U2BxINAX/eyE5WBsgp7vVFGbtCqpa+sBArULMdsFouNVX8qQQ9oIqtt/7PXO rLRaRYVJ9nZ/zHSApPl2quJdLSe1h5NKL6q6bqsIzy3T3yyyjoSnuR3+6keQH9p4L8Uc NxtA8F8AmmvvkW297Daepygynaz0Qd7NmPzhw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zwueem1EPljcXnRaD27ju0e/9VU20MKGGmsIv6bb3i0=; b=nyksuQM/nDXPjfjnAE5LSBh3phtEUAK/8VovpT5u9OOMEny6OWN42ZMH2Zfyo5TbMj SCqCeYjJkwEjOhiWB+Nk9nkL2l3x5A5hmJ8AS5BcEP3QclEMt/GK5CSG8fjb7oaUVcPK 2vGsQS0Uo0LcKDmNnNZDNVKPwUrHvcB6/QlOKcvxrPUT3SIE4XixA3jzMc7ePo9gHqSj Iroz6O4Q5pF+1guXr7hBjWgj3Ll2YaXxE7oqHsYbuZvpR1ZLlBhN8hzgEqam4WK1q6up QenH4Dlp2eVRc1UDa1Rgq+8vFDIB0ERcLfhzKwVWAEPgqtB8QicxtYdFe7CFfeTaiiIp 9SLg== X-Gm-Message-State: APjAAAVobIKiZlv5eqH13JlZ58cRI4heNLwkXk1yML/kT7ZdmkouUzo1 F2mJLl5n/UZJKrRbLzj0RouH1w== X-Received: by 2002:a2e:4296:: with SMTP id h22mr9113125ljf.208.1570182509097; Fri, 04 Oct 2019 02:48:29 -0700 (PDT) Received: from prevas-ravi.prevas.se ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id h12sm1116585ljg.24.2019.10.04.02.48.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Oct 2019 02:48:28 -0700 (PDT) From: Rasmus Villemoes To: Michael Turquette , Stephen Boyd Cc: Rasmus Villemoes , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] clk: mark clk_disable_unused() as __init Date: Fri, 4 Oct 2019 11:48:25 +0200 Message-Id: <20191004094826.8320-1-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org clk_disable_unused is only called once, as a late_initcall, so reclaim a bit of memory by marking it (and the functions and data it is the sole user of) as __init/__initdata. This moves ~1900 bytes from .text to .init.text for a imx_v6_v7_defconfig. Signed-off-by: Rasmus Villemoes --- drivers/clk/clk.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 1c677d7f7f53..a81985285a3d 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -1187,7 +1187,7 @@ static void clk_core_disable_unprepare(struct clk_core *core) clk_core_unprepare_lock(core); } -static void clk_unprepare_unused_subtree(struct clk_core *core) +static void __init clk_unprepare_unused_subtree(struct clk_core *core) { struct clk_core *child; @@ -1217,7 +1217,7 @@ static void clk_unprepare_unused_subtree(struct clk_core *core) clk_pm_runtime_put(core); } -static void clk_disable_unused_subtree(struct clk_core *core) +static void __init clk_disable_unused_subtree(struct clk_core *core) { struct clk_core *child; unsigned long flags; @@ -1263,7 +1263,7 @@ static void clk_disable_unused_subtree(struct clk_core *core) clk_core_disable_unprepare(core->parent); } -static bool clk_ignore_unused; +static bool clk_ignore_unused __initdata; static int __init clk_ignore_unused_setup(char *__unused) { clk_ignore_unused = true; @@ -1271,7 +1271,7 @@ static int __init clk_ignore_unused_setup(char *__unused) } __setup("clk_ignore_unused", clk_ignore_unused_setup); -static int clk_disable_unused(void) +static int __init clk_disable_unused(void) { struct clk_core *core; -- 2.20.1