From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Javier Martinez Canillas <javier@osg.samsung.com>
Cc: linux-kernel@vger.kernel.org, Hanjun Guo <hanjun.guo@linaro.org>,
linux-acpi@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
Al Stone <al.stone@linaro.org>, Len Brown <lenb@kernel.org>
Subject: Re: [PATCH] ACPI: Fix build errors due objects compiled unconditionally
Date: Thu, 10 Dec 2015 00:13:22 +0100 [thread overview]
Message-ID: <12725891.QmF251BB6I@vostro.rjw.lan> (raw)
In-Reply-To: <1448040902-1349-1-git-send-email-javier@osg.samsung.com>
On Friday, November 20, 2015 02:35:02 PM Javier Martinez Canillas wrote:
> If the CONFIG_ACPI Kconfig symbol is not enabled and a partial build is
> attempted, compile errors will happen due missing types and identifiers.
>
> This can be easily reproduced with the following commands:
>
> $ export CROSS_COMPILE="arm-linux-gnueabihf-" ARCH=arm
> $ make allmodconfig
> $ make M=drivers/acpi/
> CC drivers/acpi//tables.o
> drivers/acpi//tables.c:235:3: warning: 'struct acpi_subtable_proc' declared inside parameter list
> unsigned int max_entries)
> ^
> drivers/acpi//tables.c:235:3: warning: its scope is only this definition or declaration, which is probably not what you want
> drivers/acpi//tables.c: In function 'acpi_parse_entries_array':
> drivers/acpi//tables.c:269:4: error: invalid use of undefined type 'struct acpi_subtable_proc'
> ...
> scripts/Makefile.build:258: recipe for target 'drivers/acpi//tables.o' failed
> make[1]: *** [drivers/acpi//tables.o] Error 1
> Makefile:1401: recipe for target '_module_drivers/acpi/' failed
> make: *** [_module_drivers/acpi/] Error 2
>
> This is because objects are tried to be built unconditionally even when
> CONFIG_ACPI is not enabled. This is usually not a problem since arches'
> Kconfig sources drivers/acpi/Kconfig directly and also selects ACPI but
> the Makefile should conditionally build the objects as well to prevent
> these build errors.
>
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
OK, I think this shouldn't hurt anyone.
Queued up for 4.5, thanks!
Rafael
prev parent reply other threads:[~2015-12-09 22:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-20 17:35 Javier Martinez Canillas
2015-12-09 23:13 ` Rafael J. Wysocki [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=12725891.QmF251BB6I@vostro.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=al.stone@linaro.org \
--cc=arnd@arndb.de \
--cc=hanjun.guo@linaro.org \
--cc=javier@osg.samsung.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®