[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20151019084853.GA12164@amd>
Date: Mon, 19 Oct 2015 10:48:53 +0200
From: Pavel Machek <pavel@....cz>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>,
Greg Ungerer <gerg@...inux.org>, linux-pm@...r.kernel.org,
linux-m68kvger.kernel.org@...san.of.borg,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] PM / clk: Fix broken build due to non-matching code and
header #ifdefs
On Mon 2015-10-19 10:16:07, Geert Uytterhoeven wrote:
> If an architecture's main Kconfig file doesn't include
> kernel/power/Kconfig, but CONFIG_PM=y and HAVE_CLK=y (e.g. m68knommu
> allmodconfig):
>
> drivers/base/power/clock_ops.c: In function ‘__pm_clk_add’:
> drivers/base/power/clock_ops.c:106: error: ‘struct pm_subsys_data’ has no member named ‘clock_list’
> drivers/base/power/clock_ops.c: At top level:
> drivers/base/power/clock_ops.c:120: error: redefinition of ‘pm_clk_add’
> include/linux/pm_clock.h:64: error: previous definition of ‘pm_clk_add’ was here
> drivers/base/power/clock_ops.c:135: error: redefinition of ‘pm_clk_add_clk’
> include/linux/pm_clock.h:69: error: previous definition of ‘pm_clk_add_clk’ was here
> drivers/base/power/clock_ops.c:171: error: redefinition of ‘pm_clk_remove’
> include/linux/pm_clock.h:73: error: previous definition of ‘pm_clk_remove’ was here
> drivers/base/power/clock_ops.c: In function ‘pm_clk_remove’:
> drivers/base/power/clock_ops.c:180: error: ‘struct pm_subsys_data’ has no member named ‘clock_list’
> drivers/base/power/clock_ops.c:180: error: ‘struct pm_subsys_data’ has no member named ‘clock_list’
> drivers/base/power/clock_ops.c: At top level:
> drivers/base/power/clock_ops.c:207: error: redefinition of ‘pm_clk_init’
> include/linux/pm_clock.h:54: error: previous definition of ‘pm_clk_init’ was here
> drivers/base/power/clock_ops.c: In function ‘pm_clk_init’:
> drivers/base/power/clock_ops.c:210: error: ‘struct pm_subsys_data’ has no member named ‘clock_list’
> drivers/base/power/clock_ops.c: At top level:
> drivers/base/power/clock_ops.c:221: error: redefinition of ‘pm_clk_create’
> include/linux/pm_clock.h:57: error: previous definition of ‘pm_clk_create’ was here
> drivers/base/power/clock_ops.c:234: error: redefinition of ‘pm_clk_destroy’
> include/linux/pm_clock.h:61: error: previous definition of ‘pm_clk_destroy’ was here
> drivers/base/power/clock_ops.c: In function ‘pm_clk_destroy’:
> drivers/base/power/clock_ops.c:246: error: ‘struct pm_subsys_data’ has no member named ‘clock_list’
> drivers/base/power/clock_ops.c:246: error: ‘struct pm_subsys_data’ has no member named ‘clock_list’
> drivers/base/power/clock_ops.c: At top level:
> drivers/base/power/clock_ops.c:263: error: expected identifier or ‘(’ before ‘void’
> drivers/base/power/clock_ops.c:263: error: expected ‘)’ before numeric constant
> drivers/base/power/clock_ops.c:293: error: expected identifier or ‘(’ before ‘void’
> drivers/base/power/clock_ops.c:293: error: expected ‘)’ before numeric constant
> drivers/base/power/clock_ops.c: In function ‘pm_clk_runtime_suspend’:
> drivers/base/power/clock_ops.c:384: error: called object ‘0u’ is not a function
> drivers/base/power/clock_ops.c: In function ‘pm_clk_runtime_resume’:
> drivers/base/power/clock_ops.c:400: error: called object ‘0u’ is not a function
>
> This happens because:
> - drivers/base/power/clock_ops.c depends on CONFIG_HAVE_CLK,
> - the failing code inside clock_ops.c additionally depends on
> CONFIG_PM,
> - the forward declarations and other definitions in <linux/pm_clock.h>
> depend on CONFIG_PM_CLK,
> - CONFIG_PM_CLK is defined as PM && HAVE_CLK in kernel/power/Kconfig,
> but it is not included on all architectures.
>
> Fix this by protecting the failing code inside clock_ops.c by
> CONFIG_PM_CLK instead of CONFIG_PM, so it matches <linux/pm_clock.h>.
>
> Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>
Acked-by: Pavel Machek <pavel@....cz>
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists