mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Jaswinder Singh Rajput <jaswinder@kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Tony Luck <tony.luck@intel.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Greg Ungerer <gerg@snapgear.com>,
	Ralf Baechle <ralf@linux-mips.org>,
	Michael Abbott <michael@araneidae.co.uk>,
	Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	David Howells <dhowells@redhat.com>
Subject: Re: [GIT PULL] headers_check fixes
Date: Sun, 7 Jun 2009 00:24:15 +0100	[thread overview]
Message-ID: <20090606232415.GB4813@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20090606221223.GA20945@uranus.ravnborg.org>

On Sun, Jun 07, 2009 at 12:12:23AM +0200, Sam Ravnborg wrote:
> Hi Russell.
> 
> On Sat, Jun 06, 2009 at 10:47:11PM +0100, Russell King wrote:
> > Right, below is a patch to unifdef.c which allows it to work out if
> > an #if expression always evaluates true or false for symbols which
> > are being undefined/always defined.
> > 
> > The patch is slightly more complicated than I'd hoped because unifdef
> > needs to see lines fully evaluated - doing otherwise causes it to
> > mark the line as "dirty" and copy it over no matter what.
> > 
> > What follows this email is the diff of what effect it has on the
> > headers copied over - as can be seen, all resulting changes are of
> > net benefit.
> 
> You beat me on this one.
> I was looking into supportting short_circuit_and/short_circuit_or too.
> Your patch looks better - thanks!
> 
> >From my very limited testing this patch suffers from a problem I faced too.
> When you run it on for example hwcap.h or my sample file:
> #if defined(__KERNEL__) && !defined(__ASSEMBLY__)
>   int a;
> #endif
> 
> then the return code of the program is 1 so we do not copy the file.

That's correct.  If unifdef removes any lines, the exit code is 1, not
zero.  This happens with the unmodified unifdef as well, so I'm not
changing that behaviour.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:

  reply	other threads:[~2009-06-06 23:24 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-04 12:23 [PATCH 0/6] headers_check fix patches 20090604 Jaswinder Singh Rajput
2009-06-04 12:27 ` [PATCH 1/6] headers_check fix: arm, hwcap.h Jaswinder Singh Rajput
2009-06-04 12:29   ` [PATCH 2/6] headers_check fix: ia64, fpswa.h Jaswinder Singh Rajput
2009-06-04 12:31     ` [PATCH 3/6] headers_check fix: m68k, swab.h Jaswinder Singh Rajput
2009-06-04 12:35       ` [PATCH 4/6] headers_check fix: mips, ioctl.h Jaswinder Singh Rajput
2009-06-04 12:37         ` [PATCH 5/6] headers_check fix: mn10300, ptrace.h Jaswinder Singh Rajput
2009-06-04 12:38           ` [PATCH 6/6] headers_check fix: mn10300, setup.h Jaswinder Singh Rajput
2009-06-04 12:46         ` [PATCH 4/6] headers_check fix: mips, ioctl.h Ralf Baechle
2009-06-04 20:09           ` Sam Ravnborg
2009-06-05  9:34             ` Arnd Bergmann
2009-06-05 12:04               ` Ralf Baechle
2009-06-04 20:22     ` [PATCH 2/6] headers_check fix: ia64, fpswa.h Sam Ravnborg
2009-06-08 16:33       ` Luck, Tony
2009-06-08 17:48         ` [PATCH] ia64: unexport fpswa.h Sam Ravnborg
2009-06-05  9:26     ` [PATCH 2/6] headers_check fix: ia64, fpswa.h Arnd Bergmann
2009-06-04 12:53   ` [PATCH 1/6] headers_check fix: arm, hwcap.h Russell King
2009-06-04 15:45     ` Jaswinder Singh Rajput
2009-06-04 20:16     ` Sam Ravnborg
2009-06-05 20:10       ` Russell King
2009-06-05 20:17         ` Robert P. J. Day
2009-06-05 20:48       ` Russell King
2009-06-05 21:24         ` Sam Ravnborg
2009-06-06  8:50         ` Jaswinder Singh Rajput
2009-06-06  9:12           ` Russell King
2009-06-06  9:34             ` Jaswinder Singh Rajput
2009-06-04 20:12 ` [PATCH 0/6] headers_check fix patches 20090604 Sam Ravnborg
2009-06-05  2:00   ` Jaswinder Singh Rajput
2009-06-06  8:10 ` Jaswinder Singh Rajput
2009-06-06  8:43   ` Sam Ravnborg
2009-06-06  9:09     ` Jaswinder Singh Rajput
2009-06-06 12:54 ` [GIT PULL] headers_check fixes Jaswinder Singh Rajput
2009-06-06 13:02   ` Russell King
2009-06-06 13:34     ` Jaswinder Singh Rajput
2009-06-06 13:41       ` Russell King
2009-06-06 14:39     ` Jaswinder Singh Rajput
2009-06-06 21:47       ` Russell King
2009-06-06 21:51         ` Russell King
2009-06-06 22:12         ` Sam Ravnborg
2009-06-06 23:24           ` Russell King [this message]
2009-06-07  7:09             ` Sam Ravnborg
2009-06-07  7:16         ` Sam Ravnborg
2009-06-07 10:15         ` Jaswinder Singh Rajput
  -- strict thread matches above, loose matches on Subject: below --
2009-06-01  7:20 Jaswinder Singh Rajput
2009-01-26 18:01 [git pull] " Ingo Molnar

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=20090606232415.GB4813@flint.arm.linux.org.uk \
    --to=rmk+lkml@arm.linux.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=catalin.marinas@arm.com \
    --cc=dhowells@redhat.com \
    --cc=geert@linux-m68k.org \
    --cc=gerg@snapgear.com \
    --cc=jaswinder@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael@araneidae.co.uk \
    --cc=mingo@elte.hu \
    --cc=ralf@linux-mips.org \
    --cc=sam@ravnborg.org \
    --cc=tony.luck@intel.com \
    --cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome