From patchwork Wed Feb 10 13:17:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Wunner X-Patchwork-Id: 8271931 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EF00D9F859 for ; Wed, 10 Feb 2016 13:17:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 14237203AE for ; Wed, 10 Feb 2016 13:17:28 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id C3C4C20394 for ; Wed, 10 Feb 2016 13:17:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AC5D1720EE; Wed, 10 Feb 2016 05:17:25 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout2.hostsharing.net (mailout2.hostsharing.net [83.223.90.233]) by gabe.freedesktop.org (Postfix) with ESMTPS id E92496E1A7; Wed, 10 Feb 2016 05:17:23 -0800 (PST) Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mailout2.hostsharing.net (Postfix) with ESMTPS id 0126D10189AC0; Wed, 10 Feb 2016 14:17:21 +0100 (CET) Received: from localhost (6-38-90-81.adsl.cmo.de [81.90.38.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by h08.hostsharing.net (Postfix) with ESMTPSA id DBA3C605DFB6; Wed, 10 Feb 2016 14:17:18 +0100 (CET) Date: Wed, 10 Feb 2016 14:17:41 +0100 From: Lukas Wunner To: Stephen Rothwell Subject: Re: linux-next: build failure after merge of the drm-misc tree Message-ID: <20160210131741.GA15492@wunner.de> References: <20160210122451.55391e43@canb.auug.org.au> <20160210084138.GA15392@wunner.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20160210084138.GA15392@wunner.de> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Daniel Vetter , intel-gfx@lists.freedesktop.org, "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-acpi@vger.kernel.org, linux-next@vger.kernel.org, Darren Hart X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, On Wed, Feb 10, 2016 at 09:41:38AM +0100, Lukas Wunner wrote: > On Wed, Feb 10, 2016 at 12:24:51PM +1100, Stephen Rothwell wrote: > > Hi all, > > > > After merging the drm-misc tree, today's linux-next build (arm > > multi_v7_defconfig) failed like this: > > > > In file included from drivers/gpu/drm/nouveau/nouveau_drm.c:25:0: > > include/linux/apple-gmux.h: In function 'apple_gmux_present': > > include/linux/apple-gmux.h:36:42: error: implicit declaration of function 'acpi_dev_present' [-Werror=implicit-function-declaration] > > return IS_ENABLED(CONFIG_APPLE_GMUX) && acpi_dev_present(GMUX_ACPI_HID); > > ^ > > > > Caused by commit > > > > 2413306c2566 ("apple-gmux: Add helper for presence detect") > > > > I have used the drm-misc tree from next-20160209 for today. > > Ugh, apologies, I didn't have a non-ACPI platform available to test > this on. > > Solution is to either add to include/linux/acpi.h > > static inline bool acpi_dev_present(const char *hid) > { > return false; > } > > somewhere below > > #else /* !CONFIG_ACPI */ > > or alternatively to add to include/linux/apple-gmux.h > > IS_ENABLED(CONFIG_ACPI) > > in apple_gmux_present(). > > I'll check the other users of acpi_dev_present() to see which of > these two solutions is more appropriate and will post a fix shortly. The patch included below fixes the build if CONFIG_ACPI is not set. @Daniel Vetter: Would it be possible to squash this with 2413306c2566 ("apple-gmux: Add helper for presence detect") on topic/drm-misc so as to avoid build breakage for anyone trying to bisect between that commit and this fix? I checked all other users of acpi_dev_present() and all of them are only compiled if CONFIG_ACPI is set. Hence I opted to fix this in rather than in . Thanks again Stephen for reporting this at such an early stage, though doubtlessly it would have been better if I had thought of this possibility when preparing the original patch, or if I had compile-tested without CONFIG_ACPI. :-( Lukas -- >8 -- Subject: [PATCH] apple-gmux: Fix build breakage if !CONFIG_ACPI The DRM drivers i915, nouveau and radeon may be compiled with CONFIG_ACPI not set, in which case acpi_dev_present() is undefined. Add a no-op stub for apple_gmux_present() which is used if CONFIG_APPLE_GMUX is not enabled to avoid build breakage. (CONFIG_APPLE_GMUX depends on CONFIG_ACPI.) Reported-by: Stephen Rothwell Signed-off-by: Lukas Wunner --- include/linux/apple-gmux.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/include/linux/apple-gmux.h b/include/linux/apple-gmux.h index feebc28..b2d32e0 100644 --- a/include/linux/apple-gmux.h +++ b/include/linux/apple-gmux.h @@ -22,6 +22,8 @@ #define GMUX_ACPI_HID "APP000B" +#if IS_ENABLED(CONFIG_APPLE_GMUX) + /** * apple_gmux_present() - detect if gmux is built into the machine * @@ -33,7 +35,16 @@ */ static inline bool apple_gmux_present(void) { - return IS_ENABLED(CONFIG_APPLE_GMUX) && acpi_dev_present(GMUX_ACPI_HID); + return acpi_dev_present(GMUX_ACPI_HID); } +#else /* !CONFIG_APPLE_GMUX */ + +static inline bool apple_gmux_present(void) +{ + return false; +} + +#endif /* !CONFIG_APPLE_GMUX */ + #endif /* LINUX_APPLE_GMUX_H */