All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mel Gorman <mel@csn.ul.ie>
To: Am?rico Wang <xiyou.wangcong@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Namhyung Kim <namhyung@gmail.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scripts: Fix gfp-translate for recent changes to gfp.h
Date: Tue, 23 Nov 2010 08:22:15 +0000	[thread overview]
Message-ID: <20101123082215.GC19571@csn.ul.ie> (raw)
In-Reply-To: <20101123043710.GA5187@cr0.nay.redhat.com>

On Tue, Nov 23, 2010 at 12:37:10PM +0800, Am?rico Wang wrote:
> On Mon, Nov 22, 2010 at 12:00:02PM +0000, Mel Gorman wrote:
> >The recent changes to gfp.h to satisfy sparse broke
> >scripts/gfp-translate. This patch fixes it up to work with old and new
> >versions of gfp.h .
> >
> >Signed-off-by: Mel Gorman <mel@csn.ul.ie>
> >---
> > scripts/gfp-translate |    7 ++++++-
> > 1 files changed, 6 insertions(+), 1 deletions(-)
> >
> >diff --git a/scripts/gfp-translate b/scripts/gfp-translate
> >index d81b968..128937e 100644
> >--- a/scripts/gfp-translate
> >+++ b/scripts/gfp-translate
> >@@ -63,7 +63,12 @@ fi
> > 
> > # Extract GFP flags from the kernel source
> > TMPFILE=`mktemp -t gfptranslate-XXXXXX` || exit 1
> >-grep "^#define __GFP" $SOURCE/include/linux/gfp.h | sed -e 's/(__force gfp_t)//' | sed -e 's/u)/)/' | grep -v GFP_BITS | sed -e 's/)\//) \//' > $TMPFILE
> >+grep ___GFP $SOURCE/include/linux/gfp.h > /dev/null
> 
> You might want 'grep -q'. :)
> 

I *do* want grep -q :) . Andrew has already applied a relevant fix, thanks
Andrew.

> 
> >+if [ $? -eq 0 ]; then
> >+	grep "^#define ___GFP" $SOURCE/include/linux/gfp.h | sed -e 's/u$//' | grep -v GFP_BITS > $TMPFILE
> >+else
> >+	grep "^#define __GFP" $SOURCE/include/linux/gfp.h | sed -e 's/(__force gfp_t)//' | sed -e 's/u)/)/' | grep -v GFP_BITS | sed -e 's/)\//) \//' > $TMPFILE
> >+fi
> > 
> > # Parse the flags
> > IFS="
> 
> Other than that, this patch looks fine for me.
> 
> Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
> 

Cheers.

-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab

WARNING: multiple messages have this Message-ID (diff)
From: Mel Gorman <mel@csn.ul.ie>
To: Am?rico Wang <xiyou.wangcong@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Namhyung Kim <namhyung@gmail.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scripts: Fix gfp-translate for recent changes to gfp.h
Date: Tue, 23 Nov 2010 08:22:15 +0000	[thread overview]
Message-ID: <20101123082215.GC19571@csn.ul.ie> (raw)
In-Reply-To: <20101123043710.GA5187@cr0.nay.redhat.com>

On Tue, Nov 23, 2010 at 12:37:10PM +0800, Am?rico Wang wrote:
> On Mon, Nov 22, 2010 at 12:00:02PM +0000, Mel Gorman wrote:
> >The recent changes to gfp.h to satisfy sparse broke
> >scripts/gfp-translate. This patch fixes it up to work with old and new
> >versions of gfp.h .
> >
> >Signed-off-by: Mel Gorman <mel@csn.ul.ie>
> >---
> > scripts/gfp-translate |    7 ++++++-
> > 1 files changed, 6 insertions(+), 1 deletions(-)
> >
> >diff --git a/scripts/gfp-translate b/scripts/gfp-translate
> >index d81b968..128937e 100644
> >--- a/scripts/gfp-translate
> >+++ b/scripts/gfp-translate
> >@@ -63,7 +63,12 @@ fi
> > 
> > # Extract GFP flags from the kernel source
> > TMPFILE=`mktemp -t gfptranslate-XXXXXX` || exit 1
> >-grep "^#define __GFP" $SOURCE/include/linux/gfp.h | sed -e 's/(__force gfp_t)//' | sed -e 's/u)/)/' | grep -v GFP_BITS | sed -e 's/)\//) \//' > $TMPFILE
> >+grep ___GFP $SOURCE/include/linux/gfp.h > /dev/null
> 
> You might want 'grep -q'. :)
> 

I *do* want grep -q :) . Andrew has already applied a relevant fix, thanks
Andrew.

> 
> >+if [ $? -eq 0 ]; then
> >+	grep "^#define ___GFP" $SOURCE/include/linux/gfp.h | sed -e 's/u$//' | grep -v GFP_BITS > $TMPFILE
> >+else
> >+	grep "^#define __GFP" $SOURCE/include/linux/gfp.h | sed -e 's/(__force gfp_t)//' | sed -e 's/u)/)/' | grep -v GFP_BITS | sed -e 's/)\//) \//' > $TMPFILE
> >+fi
> > 
> > # Parse the flags
> > IFS="
> 
> Other than that, this patch looks fine for me.
> 
> Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
> 

Cheers.

-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2010-11-23  8:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-22 12:00 [PATCH] scripts: Fix gfp-translate for recent changes to gfp.h Mel Gorman
2010-11-22 12:00 ` Mel Gorman
2010-11-23  2:54 ` Namhyung Kim
2010-11-23  2:54   ` Namhyung Kim
2010-11-23  4:37 ` Américo Wang
2010-11-23  4:37   ` Américo Wang
2010-11-23  8:22   ` Mel Gorman [this message]
2010-11-23  8:22     ` Mel Gorman

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=20101123082215.GC19571@csn.ul.ie \
    --to=mel@csn.ul.ie \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=namhyung@gmail.com \
    --cc=xiyou.wangcong@gmail.com \
    /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.