From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751659AbdJFBk0 (ORCPT ); Thu, 5 Oct 2017 21:40:26 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:38522 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751526AbdJFBkZ (ORCPT ); Thu, 5 Oct 2017 21:40:25 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 05 Oct 2017 18:40:23 -0700 From: Sodagudi Prasad To: Viresh Kumar , gregkh@linuxfoundation.org Cc: gregkh@linuxfoundation.org, juri.lelli@arm.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] arch_topology: Fix section miss match warning due to free_raw_capacity() In-Reply-To: <20170925232019.GD3053@ubuntu> References: <1506379904-1007-1-git-send-email-psodagud@codeaurora.org> <20170925232019.GD3053@ubuntu> Message-ID: <44861c45841cc1dbc1ecac5df495ce35@codeaurora.org> User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017-09-25 16:20, Viresh Kumar wrote: > On 25-09-17, 15:51, Prasad Sodagudi wrote: >> Remove the __init annotation from free_raw_capacity() to avoid >> the following warning. >> >> The function init_cpu_capacity_callback() references the >> function __init free_raw_capacity(). >> WARNING: vmlinux.o(.text+0x425cc0): Section mismatch in reference >> from the function init_cpu_capacity_callback() to the function >> .init.text:free_raw_capacity(). >> >> Signed-off-by: Prasad Sodagudi >> --- >> drivers/base/arch_topology.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/base/arch_topology.c >> b/drivers/base/arch_topology.c >> index 41be9ff..3da53cc 100644 >> --- a/drivers/base/arch_topology.c >> +++ b/drivers/base/arch_topology.c >> @@ -96,7 +96,7 @@ static int register_cpu_capacity_sysctl(void) >> static u32 capacity_scale; >> static u32 *raw_capacity; >> >> -static int __init free_raw_capacity(void) >> +static int free_raw_capacity(void) >> { >> kfree(raw_capacity); >> raw_capacity = NULL; > > So we need the __init thing only when cpufreq support isn't there in > the kernel > and I am not sure if we want to add more ifdef hackery in the > declaration of > free_raw_capacity(). > > Acked-by: Viresh Kumar Hi Greg, Can you please consider this patch ? -Thanks, Prasad -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, Linux Foundation Collaborative Project