scripts: Fix gfp-translate for recent changes to gfp.h
PATCH 1/1 scripts: Fix gfp-translate for recent changes to gfp.h
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 .
--- scripts/gfp-translate | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
scripts/gfp-translate +6 -1
@@ -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 +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="
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. 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:"[email protected]"> [email protected] </a>
2010-11-22 (월), 12:00 +0000, Mel Gorman:
Quoted 3 lines
The recent changes to
gfp.hto satisfy sparse brokescripts/gfp-translate. This patch fixes it up to work with old and new versions ofgfp.h.
Oh, I didn't even know the script exists. Sorry.
Signature · 2 lines
Regards, Namhyung Kim
Quoted 17 lines · Mel Gorman
The recent changes to
gfp.hto satisfy sparse brokescripts/gfp-translate. This patch fixes it up to work with old and new versions ofgfp.h.Signed-off-by Mel Gorman <[email protected]>---
scripts/gfp-translate| 7 ++++++-1 files changed, 6 insertions(+), 1 deletions(-)scripts/gfp-translate +0
-0@@ -63,7 +63,12 @@ fi # Extract GFP flags from the kernel sourceTMPFILE=
mktemp -t gfptranslate-XXXXXX|| exit 1
scripts/gfp-translate fi · line 66
Quoted 2 lines
scripts/gfp-translate +1
-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'. :)
Quoted 8 lines
scripts/gfp-translate +5
-0+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.
Thanks.
Quoted 16 lines · Am?rico Wang
Quoted 15 lines · Mel Gorman
The recent changes to
gfp.hto satisfy sparse brokescripts/gfp-translate. This patch fixes it up to work with old and new versions ofgfp.h.Signed-off-by Mel Gorman <[email protected]>---
scripts/gfp-translate| 7 ++++++-1 files changed, 6 insertions(+), 1 deletions(-)scripts/gfp-translate +0
-0@@ -63,7 +63,12 @@ fi
Quoted 7 lines
scripts/gfp-translate fi · line 66
Quoted 4 lines
scripts/gfp-translate +0
-0# Extract GFP flags from the kernel sourceTMPFILE=
mktemp -t gfptranslate-XXXXXX|| exit 1scripts/gfp-translate +1
-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/nullYou might want 'grep -q'. :)
I *do* want grep -q :) . Andrew has already applied a relevant fix, thanks Andrew.
Quoted 7 lines
Quoted 7 lines
scripts/gfp-translate +5
-0+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
Quoted 7 lines
Quoted 2 lines
# Parse the flags
IFS="Other than that, this patch looks fine for me.
Reviewed-by WANG Cong <[email protected]>
Cheers.
Signature · 3 lines
Mel Gorman Part-time Phd Student Linux Technology Center University of Limerick IBM Dublin Software Lab