From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753797AbbLIWnZ (ORCPT ); Wed, 9 Dec 2015 17:43:25 -0500 Received: from v094114.home.net.pl ([79.96.170.134]:45903 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1750904AbbLIWnX (ORCPT ); Wed, 9 Dec 2015 17:43:23 -0500 From: "Rafael J. Wysocki" To: Javier Martinez Canillas Cc: linux-kernel@vger.kernel.org, Hanjun Guo , linux-acpi@vger.kernel.org, Arnd Bergmann , Al Stone , Len Brown Subject: Re: [PATCH] ACPI: Fix build errors due objects compiled unconditionally Date: Thu, 10 Dec 2015 00:13:22 +0100 Message-ID: <12725891.QmF251BB6I@vostro.rjw.lan> User-Agent: KMail/4.11.5 (Linux/4.1.0-rc5+; KDE/4.11.5; x86_64; ; ) In-Reply-To: <1448040902-1349-1-git-send-email-javier@osg.samsung.com> References: <1448040902-1349-1-git-send-email-javier@osg.samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 OK, I think this shouldn't hurt anyone. Queued up for 4.5, thanks! Rafael