[lkml]   [2009]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [GIT PULL] headers_check fixes
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;

then the return code of the program is 1 so we do not copy the file.

I'm heading for bed - will take a closer look tomorrow.


 \ /
  Last update: 2009-06-07 00:13    [W:0.069 / U:2.720 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site