* Re: linux-next: build failure after merge of the drm-misc tree [not found] <20160210122451.55391e43@canb.auug.org.au> @ 2016-02-10 8:41 ` Lukas Wunner 2016-02-10 13:17 ` Lukas Wunner 0 siblings, 1 reply; 3+ messages in thread From: Lukas Wunner @ 2016-02-10 8:41 UTC (permalink / raw) To: Stephen Rothwell Cc: Daniel Vetter, intel-gfx, Rafael J. Wysocki, linux-kernel, dri-devel, linux-acpi, linux-next, Darren Hart [cc += Rafael J. Wysocki, linux-acpi] Hi Stephen, 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. Thanks a lot for reporting this. Lukas _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: linux-next: build failure after merge of the drm-misc tree 2016-02-10 8:41 ` linux-next: build failure after merge of the drm-misc tree Lukas Wunner @ 2016-02-10 13:17 ` Lukas Wunner 2016-02-10 13:37 ` Daniel Vetter 0 siblings, 1 reply; 3+ messages in thread From: Lukas Wunner @ 2016-02-10 13:17 UTC (permalink / raw) To: Stephen Rothwell Cc: Daniel Vetter, intel-gfx, Rafael J. Wysocki, linux-kernel, dri-devel, linux-acpi, linux-next, Darren Hart 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 <linux/apple-gmux.h> rather than in <linux/acpi.h>. 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 <sfr@canb.auug.org.au> Signed-off-by: Lukas Wunner <lukas@wunner.de> --- 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 */ -- 1.8.5.2 (Apple Git-48) _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: linux-next: build failure after merge of the drm-misc tree 2016-02-10 13:17 ` Lukas Wunner @ 2016-02-10 13:37 ` Daniel Vetter 0 siblings, 0 replies; 3+ messages in thread From: Daniel Vetter @ 2016-02-10 13:37 UTC (permalink / raw) To: Lukas Wunner Cc: Stephen Rothwell, Daniel Vetter, intel-gfx, Rafael J. Wysocki, linux-kernel, dri-devel, linux-acpi, linux-next, Darren Hart On Wed, Feb 10, 2016 at 02:17:41PM +0100, Lukas Wunner wrote: > 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 > <linux/apple-gmux.h> rather than in <linux/acpi.h>. > > 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. :-( Since !ACPI and enabling APPLE_GMUX is a bit a fringe config I don't think this will hurt bisectability at all on a real system. So just applied this one on top of drm-misc. Thanks, Daniel > > 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 <sfr@canb.auug.org.au> > Signed-off-by: Lukas Wunner <lukas@wunner.de> > --- > 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 */ > -- > 1.8.5.2 (Apple Git-48) > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-02-10 13:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20160210122451.55391e43@canb.auug.org.au>
2016-02-10 8:41 ` linux-next: build failure after merge of the drm-misc tree Lukas Wunner
2016-02-10 13:17 ` Lukas Wunner
2016-02-10 13:37 ` Daniel Vetter
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox