All of lore.kernel.org
 help / color / mirror / Atom feed
From: walter harms <wharms@bfs.de>
To: kernel-janitors@vger.kernel.org
Subject: Re: [KJ] [PATCH] potential parse error in ifdef
Date: Wed, 23 May 2007 07:32:20 +0000	[thread overview]
Message-ID: <4653EE04.6040508@bfs.de> (raw)
In-Reply-To: <87fy5q5dxr.fsf@wanadoo.fr>

hi Håkon,
you are right in some way but look in these (theoretical) example:

#ifdef LINUX
	donea()
#else
	doneb()
#endif

doneb() will never be used on Linux but it may  be useful for a driver programmer to
run that thing on an other system.

IMHO: add a note like "please explain why we need that dead code or we remove it", send it to the
maintainer and let him remove either the code or add an explanation.

re,
 wh

Håkon Løvdal wrote:
> On 21/05/07, Matthew Wilcox <matthew@wil.cx> wrote:
>> On Mon, May 21, 2007 at 06:39:12PM +0200, Yoann Padioleau wrote:
>> > I have made a tool to parse the kernel that does not pre-process the
>> > source. That means that my parser tries to parse all the code,
>> including
>> > code in the #else branch or code that is not often compiled because
>> > the driver is not very used (or not used at all). So, my parser
>> > sometimes reports parse error not originally detected by gcc.
>> > Here is my (first) patch.
>>
>> These all look good to me.
> 
> But one question. His tool has found some code segments
> that obviously never have been compiled and most likely are
> not included in the kernel in any way (because otherwise
> I would assume that allyesconfig would have caught them).
> 
> Dead, unused code that theoretically would compile is
> probably better than dead, unused code that would not
> compile, but if the code in question is indeed dead and
> unused I would assume that the best option would be to
> remove it?
> 
> BR Håkon Løvdal
> 
> _______________________________________________
> Kernel-janitors mailing list
> Kernel-janitors@lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors
> 
> 
> 
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors

  parent reply	other threads:[~2007-05-23  7:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-21 16:39 [KJ] [PATCH] potential parse error in ifdef Yoann Padioleau
2007-05-21 17:01 ` Matthew Wilcox
2007-05-22  8:21 ` Yoann Padioleau
2007-05-22 23:10 ` Håkon Løvdal
2007-05-22 23:12 ` Cripps
2007-05-23  7:32 ` walter harms [this message]
2007-05-23  7:46 ` Yoann Padioleau
2007-05-23  8:18 ` Robert P. J. Day
2007-05-25  7:56 ` Yoann Padioleau
2007-05-25  7:56   ` Yoann Padioleau
2007-05-25 11:50   ` [KJ] " Jiri Kosina
2007-05-25 11:50     ` Jiri Kosina
2007-05-25 16:41     ` [KJ] " Andrew Morton
2007-05-25 16:41       ` Andrew Morton
2007-06-04 18:29 ` [KJ] [PATCH] potential parse error in ifdef part 3 Yoann Padioleau
2007-06-04 18:29   ` Yoann Padioleau
2007-06-05  7:43   ` [KJ] " Geert Uytterhoeven
2007-06-05  7:43     ` Geert Uytterhoeven

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=4653EE04.6040508@bfs.de \
    --to=wharms@bfs.de \
    --cc=kernel-janitors@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.