From patchwork Thu Sep 7 14:16:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 111950 Delivered-To: patch@linaro.org Received: by 10.37.128.210 with SMTP id c18csp241791ybm; Thu, 7 Sep 2017 07:15:24 -0700 (PDT) X-Google-Smtp-Source: ADKCNb5kZ/NGDa2RqhEa8Ql15vX8oIOKqqRhktbPYRyf8cuIjput2wU3FBEPkafxeQbqc1ef6hEH X-Received: by 10.84.240.5 with SMTP id y5mr3175407plk.22.1504793724589; Thu, 07 Sep 2017 07:15:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504793724; cv=none; d=google.com; s=arc-20160816; b=FphzCptYFswmWH7y6s+sbv8wqu14PTcAgatuTvEueRhlVZbBzsUoJaH8nWIiGAqtLg d8HTCBk3uAnSFvFr4yFBBOtbdoCekcZX/z892atz23cHZrf4NSBbwdz+0Y7krDBr2JRT BepkR9NI1jLig9yTUs5BNhsS2XiaNMBKPWcdo7TH9CQV4yyTT02ZS7b+ahDzwnK0Ius1 ZlkUOYS8MnPa5rb593LSuV7ZG8gy1fs+lVDv4qyoeD66e2aOIOI9MnomImNUgGaZraSo +9yM/GYxmJ3FdKgd0RlD7+OFMgKosp3RDu6cTCPwNpYg8S5uhFm9bQqZmiwElKn6bn6E 8udA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=nqov2lIyrEiKThK+2NRTesjdfs2v/gW0uRKPNKHNKI0=; b=P1HbFzGaaQmnWvX9WHdJkadbxE7lNLg9dzEuiPE7KKk5v72dLEyywx15XsCf84zV6+ aW7GqRiZzMR2fCbVPH1ArzTvoBYAU2BAsTe4v4zKiPjvS+irDkcOoWJw++0p6Aa4XYLI Shh4jTP9Xzhnc6yGwGZfev95XJfvMmVeQTLwHMmK9Hc3tfDSGhw0CCdkvdvJBiRLv/+C b9AxS4hojVxxC8ZMq78HPIohKQrV4zHT3mvVXV5qRueF5yECsphAGt21JNITpn0bAOLu bhNhsjfJzT23rt+b4LrDMNVrtIAxrAiH3sfXiDYsBUf7naacMcygdRjpyXwEJU7GjgF5 7S9Q== ARC-Authentication-Results: i=1; mx.google.com; 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 97si1974998ple.401.2017.09.07.07.15.24; Thu, 07 Sep 2017 07:15:24 -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; 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 S1755425AbdIGOPX (ORCPT + 26 others); Thu, 7 Sep 2017 10:15:23 -0400 Received: from foss.arm.com ([217.140.101.70]:59870 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755053AbdIGOPV (ORCPT ); Thu, 7 Sep 2017 10:15:21 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6FA4115AD; Thu, 7 Sep 2017 07:15:20 -0700 (PDT) Received: from e107155-lin.cambridge.arm.com (unknown [10.1.211.34]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 80D133F483; Thu, 7 Sep 2017 07:15:19 -0700 (PDT) From: Sudeep Holla To: linux-kernel@vger.kernel.org Cc: Sudeep Holla , Juri Lelli , Greg Kroah-Hartman Subject: [PATCH] base: arch_topology: fix section mismatch build warnings Date: Thu, 7 Sep 2017 15:16:05 +0100 Message-Id: <1504793765-20048-1-git-send-email-sudeep.holla@arm.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 2ef7a2953c81 ("arm, arm64: factorize common cpu capacity default code") introduced init_cpu_capacity_callback and init_cpu_capacity_notifier which are referenced from initcall and are missing __init{,data} annotations resulting the below section mismatch build warnings. "WARNING: vmlinux.o(.text+0xbab790): Section mismatch in reference from the function init_cpu_capacity_callback() to the variable .init.text:$x The function init_cpu_capacity_callback() references the variable __init $x. This is often because init_cpu_capacity_callback lacks a __init annotation or the annotation of $x is wrong." This patch fixes the above build warnings by adding the required annotations. Fixes: 2ef7a2953c81 ("arm, arm64: factorize common cpu capacity default code") Cc: Juri Lelli Cc: Greg Kroah-Hartman Signed-off-by: Sudeep Holla --- drivers/base/arch_topology.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) -- 2.7.4 diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c index 41be9ff7d70a..6df7d6676a48 100644 --- a/drivers/base/arch_topology.c +++ b/drivers/base/arch_topology.c @@ -166,11 +166,11 @@ bool __init topology_parse_cpu_capacity(struct device_node *cpu_node, int cpu) } #ifdef CONFIG_CPU_FREQ -static cpumask_var_t cpus_to_visit; -static void parsing_done_workfn(struct work_struct *work); -static DECLARE_WORK(parsing_done_work, parsing_done_workfn); +static cpumask_var_t cpus_to_visit __initdata; +static void __init parsing_done_workfn(struct work_struct *work); +static __initdata DECLARE_WORK(parsing_done_work, parsing_done_workfn); -static int +static int __init init_cpu_capacity_callback(struct notifier_block *nb, unsigned long val, void *data) @@ -206,7 +206,7 @@ init_cpu_capacity_callback(struct notifier_block *nb, return 0; } -static struct notifier_block init_cpu_capacity_notifier = { +static struct notifier_block init_cpu_capacity_notifier __initdata = { .notifier_call = init_cpu_capacity_callback, }; @@ -232,7 +232,7 @@ static int __init register_cpufreq_notifier(void) } core_initcall(register_cpufreq_notifier); -static void parsing_done_workfn(struct work_struct *work) +static void __init parsing_done_workfn(struct work_struct *work) { cpufreq_unregister_notifier(&init_cpu_capacity_notifier, CPUFREQ_POLICY_NOTIFIER);