From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754715AbdAECxL (ORCPT ); Wed, 4 Jan 2017 21:53:11 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:34650 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752234AbdAECxK (ORCPT ); Wed, 4 Jan 2017 21:53:10 -0500 Subject: Re: [PATCH] drm: nouveau: fix build when LEDS_CLASS=m To: Ilia Mirkin , dri-devel , LKML , kbuild test robot , Ben Skeggs References: <029a1ec5-48ac-a3ce-3106-430e0f2584bb@infradead.org> <20170104084508.m54kwdkl2z6s3ruk@phenom.ffwll.local> Cc: Martin Peres From: Randy Dunlap Message-ID: Date: Wed, 4 Jan 2017 18:52:57 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/04/17 06:25, Ilia Mirkin wrote: > On Wed, Jan 4, 2017 at 3:45 AM, Daniel Vetter wrote: >> On Sun, Jan 01, 2017 at 04:20:53PM -0800, Randy Dunlap wrote: >>> From: Randy Dunlap >>> >>> Fix build errors in nouveau driver when CONFIG_LEDS_CLASS=m and >>> CONFIG_DRM_NOUVEAU=y. >>> If LEDS_CLASS is enabled, DRM_NOUVEAU is restricted to the same >>> kconfig value as LEDS_CLASS. >>> >>> drivers/built-in.o: In function `nouveau_do_suspend': >>> nouveau_drm.c:(.text+0x2030b1): undefined reference to `nouveau_led_suspend' >>> drivers/built-in.o: In function `nouveau_do_resume': >>> nouveau_drm.c:(.text+0x2034ca): undefined reference to `nouveau_led_resume' >>> drivers/built-in.o: In function `nouveau_drm_unload': >>> nouveau_drm.c:(.text+0x203a15): undefined reference to `nouveau_led_fini' >>> drivers/built-in.o: In function `nouveau_drm_load': >>> nouveau_drm.c:(.text+0x204423): undefined reference to `nouveau_led_init' >>> >>> BTW, this line in Kbuild: >>> nouveau-$(CONFIG_LEDS_CLASS) += nouveau_led.o >>> does nothing when CONFIG_LEDS_CLASS=m and CONFIG_DRM_NOUVEAU=y. >>> >>> Signed-off-by: Randy Dunlap >>> Reported-by: kbuild test robot >>> Cc: Martin Peres >>> Cc: Ben Skeggs >> >> Thrown into drm-misc, thanks. >> -Daniel > > Wasn't there already a different solution from Martin for this, using > IS_REACHABLE, instead of adding a dependency in Kconfig? nouveau_led.h contains a few lines that are bounded by #if IS_ENABLED(CONFIG_LEDS_CLASS) but that's not sufficient. Is there another patch? -- ~Randy