mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	Jean Delvare <khali@linux-fr.org>
Subject: Re: [patch] video: build fix for drivers/media/video/mt9v022.c
Date: Sat, 3 May 2008 20:15:20 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0805032004130.5182@axis700.grange> (raw)
In-Reply-To: <20080503175807.GC5292@elte.hu>

On Sat, 3 May 2008, Ingo Molnar wrote:

> * Guennadi Liakhovetski <g.liakhovetski@gmx.de> wrote:
> 
> > > with this config:
> > > 
> > >    http://redhat.com/~mingo/misc/config-Sat_May__3_16_08_39_CEST_2008.bad
> > > 
> > > the bug was that the driver uses GPIO functionality but only 
> > > includes the GPIO interface definitions for the 
> > > CONFIG_MT9M001_PCA9536_SWITCH case, which was not set in this 
> > > config.
> > 
> > Ok, once again a good catch and a wrong fix, sorry :-) The bug is that 
> > not CONFIG_MT9M001_PCA9536_SWITCH but CONFIG_MT9V022_PCA9536_SWITCH 
> > shall be checked for, of course. Copy-paste:-( I'll prepare a correct 
> > patch and submit it. As for the "cleanup" side - don't know. Would it 
> > be better to unconditionally include it? It won't hurt of course, 
> > looks better, but is unneeded when the GPIO is not used. And, although 
> > grep reports most drivers including asm/gpio.h, including linux/gpio.h 
> > seems indeed better.
> 
> No. If you look at the core kernel you wont see it sprinkled with things 
> like:
> 
>  #ifdef CONFIG_LOCKDEP
>  #include <linux/lockdep.h>
>  #endif
> 
> why? Because we have put all such things into the include file 
> themselves and do not want to sprinkle .c files with ugly #ifdefs. This 
> is a basic cleanliness issue.

Ok, right, sorry, the patch was indeed correct, just the reason for the 
compilation breakage was not quite what you suggested. So, I'll apply your 
putch, but please fix mt9m001.c in the same patch too - it also includes 
gpio.h conditionally. Although, it does test the correct macro.

Actually, this CONFIG option might disappear completely in the future, if 
we decide to switch to a module parameter instead. So that one kernel can 
be used on systems with and without the GPIO.

Thanks
Guennadi
---
Guennadi Liakhovetski

  reply	other threads:[~2008-05-03 18:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-03 16:30 Ingo Molnar
2008-05-03 17:02 ` Guennadi Liakhovetski
2008-05-03 17:58   ` Ingo Molnar
2008-05-03 18:15     ` Guennadi Liakhovetski [this message]
2008-05-03 19:50       ` Ingo Molnar
2008-05-05 14:17 ` Guennadi Liakhovetski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0805032004130.5182@axis700.grange \
    --to=g.liakhovetski@gmx.de \
    --cc=khali@linux-fr.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®