From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D9D4C43381 for ; Mon, 11 Mar 2019 12:04:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 38E93206BA for ; Mon, 11 Mar 2019 12:04:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727318AbfCKMEa (ORCPT ); Mon, 11 Mar 2019 08:04:30 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:52620 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726592AbfCKMEa (ORCPT ); Mon, 11 Mar 2019 08:04:30 -0400 Received: from 79.184.254.189.ipv4.supernova.orange.pl (79.184.254.189) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.213) id 8860bd799ca5140f; Mon, 11 Mar 2019 13:04:28 +0100 From: "Rafael J. Wysocki" To: Arnd Bergmann Cc: Viresh Kumar , Nick Desaulniers , Daniel Mack , Haojian Zhuang , Robert Jarzmik , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] cpufreq: pxa2xx: remove incorrect __init annotation Date: Mon, 11 Mar 2019 13:02:44 +0100 Message-ID: <16011281.gh0OAFSntS@aspire.rjw.lan> In-Reply-To: <20190307102250.1140038-1-arnd@arndb.de> References: <20190307102250.1140038-1-arnd@arndb.de> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday, March 7, 2019 11:22:41 AM CET Arnd Bergmann wrote: > pxa_cpufreq_init_voltages() is marked __init but usually inlined into > the non-__init pxa_cpufreq_init() function. When building with clang, > it can stay as a standalone function in a discarded section, and produce > this warning: > > WARNING: vmlinux.o(.text+0x616a00): Section mismatch in reference from the function pxa_cpufreq_init() to the function .init.text:pxa_cpufreq_init_voltages() > The function pxa_cpufreq_init() references > the function __init pxa_cpufreq_init_voltages(). > This is often because pxa_cpufreq_init lacks a __init > annotation or the annotation of pxa_cpufreq_init_voltages is wrong. > > Fixes: 50e77fcd790e ("ARM: pxa: remove __init from cpufreq_driver->init()") > Signed-off-by: Arnd Bergmann > --- > drivers/cpufreq/pxa2xx-cpufreq.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/cpufreq/pxa2xx-cpufreq.c b/drivers/cpufreq/pxa2xx-cpufreq.c > index 46254e583982..74e0e0c20c46 100644 > --- a/drivers/cpufreq/pxa2xx-cpufreq.c > +++ b/drivers/cpufreq/pxa2xx-cpufreq.c > @@ -143,7 +143,7 @@ static int pxa_cpufreq_change_voltage(const struct pxa_freqs *pxa_freq) > return ret; > } > > -static void __init pxa_cpufreq_init_voltages(void) > +static void pxa_cpufreq_init_voltages(void) > { > vcc_core = regulator_get(NULL, "vcc_core"); > if (IS_ERR(vcc_core)) { > @@ -159,7 +159,7 @@ static int pxa_cpufreq_change_voltage(const struct pxa_freqs *pxa_freq) > return 0; > } > > -static void __init pxa_cpufreq_init_voltages(void) { } > +static void pxa_cpufreq_init_voltages(void) { } > #endif > > static void find_freq_tables(struct cpufreq_frequency_table **freq_table, > Applied, thanks!