New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 676729 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Build failures "conflicting types for 'scale_cpu_capacity'"

Project Member Reported by groeck@chromium.org, Dec 22 2016

Issue description

Seen with various builds which do not have CONFIG_CPU_FREQ enabled.

./arch/arm/include/asm/topology.h:32:48: warning: 'struct sched_domain' declared inside parameter list
 extern unsigned long scale_cpu_capacity(struct sched_domain *sd, int cpu);
                                                ^
./arch/arm/include/asm/topology.h:32:48: warning: its scope is only this definition or declaration, which is probably not what you want
arch/arm/kernel/topology.c:45:15: error: conflicting types for 'scale_cpu_capacity'

 
Project Member

Comment 1 by bugdroid1@chromium.org, Dec 23 2016

Labels: merge-merged-chromeos-4.4
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/727bb550ff68077f3502e285475fb00624f75f30

commit 727bb550ff68077f3502e285475fb00624f75f30
Author: Steve Muckle <smuckle@linaro.org>
Date: Thu May 05 01:56:45 2016

ANDROID: arm: Fix build error "conflicting types for 'scale_cpu_capacity'"

Commit "arm: Update arch_scale_cpu_capacity() to reflect change to
define" introduced a dependency on struct sched_domain in
arch/arm/include/asm/topologoy.h, but that structure is only currently
defined if CONFIG_CPU_FREQ is enabled, which causes
include/linux/cpufreq.h to get pulled in which defines it.

Include <linux/cpufreq.h> regardless of CONFIG_CPU_FREQ so struct
sched_domain is always defined.

Fixes: Change-Id: I372bd5e4c1e203428d72b18c8a806b06f3567ef6
       ("arm: Update arch_scale_cpu_capacity() to reflect change to define")
Signed-off-by: Steve Muckle <smuckle@linaro.org>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
[jstultz: Cherry-picked from android-3.18]
Signed-off-by: John Stultz <john.stultz@linaro.org>

BUG= chromium:676729 
TEST=Build image with CONFIG_CPU_FREQ disabled

(cherry picked from commit ad607cd620b8caeebf3ed3336fa80921c588b27f)
Signed-off-by: Guenter Roeck <groeck@chromium.org>

Change-Id: I6808e82a8f213a247752b784abce6400b4e87f6b
Reviewed-on: https://chromium-review.googlesource.com/423436
Commit-Ready: Guenter Roeck <groeck@chromium.org>
Tested-by: Guenter Roeck <groeck@chromium.org>
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>

[modify] https://crrev.com/727bb550ff68077f3502e285475fb00624f75f30/arch/arm/include/asm/topology.h

Comment 2 by groeck@chromium.org, Dec 23 2016

Status: Fixed (was: Assigned)

Sign in to add a comment