From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Date: Thu, 19 Dec 2013 17:09:27 +0000 Subject: Re: [PATCH v3] x86: sysfb: remove sysfb when probing real hw Message-Id: <20131219170927.GC30382@gmail.com> List-Id: References: <1387374611-12493-1-git-send-email-dh.herrmann@gmail.com> <1387448038-8260-1-git-send-email-dh.herrmann@gmail.com> <20131219163606.GA29243@gmail.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: David Herrmann Cc: linux-kernel , Takashi Iwai , Stephen Warren , the arch/x86 maintainers , "linux-fbdev@vger.kernel.org" , Geert Uytterhoeven , stable * David Herrmann wrote: > Hi > > On Thu, Dec 19, 2013 at 5:36 PM, Ingo Molnar wrote: > > > > * David Herrmann wrote: > > > >> --- a/drivers/video/fbmem.c > >> +++ b/drivers/video/fbmem.c > >> @@ -35,6 +35,9 @@ > >> > >> #include > >> > >> +#if IS_ENABLED(CONFIG_X86) > >> +#include > >> +#endif > > > > I think this can be written as: > > > > #ifdef CONFIG_X86 > > # include > > #endif > > > > also ... the dependency on a large, unrelated option like CONFIG_X86 > > looks pretty ugly here - is there no other, more specific CONFIG_ > > option that can be used here - such as CONFIG_FB_SIMPLE or > > CONFIG_X86_SYSFB? > > > >> +#if IS_ENABLED(CONFIG_X86) > >> + sysfb_unregister(apert, primary); > >> +#endif > > > > Ditto. > > CONFIG_X86 is probably never 'm'.. will fix that. It was > CONFIG_X86_SYSFB before and that works, too, but the broader X86 > seemed more appropriate as sysfb is available on all x86. Well, sysfb is available if CONFIG_X86_SYSFB is set, right? So on !CONFIG_X86_SYSFB x86 kernels this code should not run, right? > Note that I have patches here locally which move > sysfb_register/unregister to drivers/video/sysfb.c and add > include/linux/sysfb.h with dummies if CONFIG_SYSFB is not selected > to avoid the #ifdef. This will allow other architectures to do > gfx-hand-over, too. They seem too big for stable, though. That's why > I split them up and added it to x86/kernel/sysfb.c first. Yeah, it's fine to do those cleanups after the minimal fix. But using a sensible config option must still be done - we cannot just slap broad CONFIG_X86 dependencies into random code. Thanks, Ingo