Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1739324 > unrolled thread

[PATCH] arch_topology: Fix section miss match warning due to free_raw_capacity()

Started byPrasad Sodagudi <psodagud@codeaurora.org>
First post2017-09-26 01:00 +0200
Last post2017-09-26 01:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] arch_topology: Fix section miss match warning due to free_raw_capacity() Prasad Sodagudi <psodagud@codeaurora.org> - 2017-09-26 01:00 +0200
    Re: [PATCH] arch_topology: Fix section miss match warning due to  free_raw_capacity() Viresh Kumar <viresh.kumar@linaro.org> - 2017-09-26 01:30 +0200

#1739324 — [PATCH] arch_topology: Fix section miss match warning due to free_raw_capacity()

FromPrasad Sodagudi <psodagud@codeaurora.org>
Date2017-09-26 01:00 +0200
Subject[PATCH] arch_topology: Fix section miss match warning due to free_raw_capacity()
Message-ID<utKw1-4oF-9@gated-at.bofh.it>
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 <psodagud@codeaurora.org>
---
 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;
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

[toc] | [next] | [standalone]


#1739355 — Re: [PATCH] arch_topology: Fix section miss match warning due to free_raw_capacity()

FromViresh Kumar <viresh.kumar@linaro.org>
Date2017-09-26 01:30 +0200
SubjectRe: [PATCH] arch_topology: Fix section miss match warning due to free_raw_capacity()
Message-ID<utKZ4-4P8-25@gated-at.bofh.it>
In reply to#1739324
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 <psodagud@codeaurora.org>
> ---
>  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 <viresh.kumar@linaro.org>

-- 
viresh

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web