mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Charan Teja Kalla <quic_charante@quicinc.com>
To: <akpm@linux-foundation.org>, <yury.norov@gmail.com>,
	<mingo@kernel.org>, <mgorman@techsingularity.net>
Cc: <linux-kernel@vger.kernel.org>, <quic_pkondeti@quicinc.com>,
	"Charan Teja Kalla" <quic_charante@quicinc.com>
Subject: [PATCH] mm: fix gfp-translate for changes in gfp.h
Date: Tue, 13 Jun 2023 10:43:37 +0530	[thread overview]
Message-ID: <1686633217-4397-1-git-send-email-quic_charante@quicinc.com> (raw)

The commit cb5a065b4ea9 ("headers/deps: mm: Split <linux/gfp_types.h>
out of <linux/gfp.h>") made all the gfp flags that the gfp-translate
script needed to move from gfp.h to gfp_types.h.  Made changes
accordingly in the gfp-translate scipt.

w/o this patch:
$./scripts/gfp-translate 0xc2cc0
Source: /local/mnt/workspace/linux_next/linux
Parsing: 0xc2cc0

with this patch:
Source: /local/mnt/workspace/linux_next/linux
Parsing: 0xc2cc0
 #define ___GFP_IO               0x40
 #define ___GFP_FS               0x80
 #define ___GFP_DIRECT_RECLAIM   0x400
 #define ___GFP_KSWAPD_RECLAIM   0x800
 #define ___GFP_NOWARN           0x2000
 #define ___GFP_COMP             0x40000
 #define ___GFP_NOMEMALLOC       0x80000

Fixes: cb5a065b4ea9 ("headers/deps: mm: Split <linux/gfp_types.h> out of <linux/gfp.h>")
Signed-off-by: Charan Teja Kalla <quic_charante@quicinc.com>
---
 scripts/gfp-translate | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/gfp-translate b/scripts/gfp-translate
index b2ce416..6c9aed1 100755
--- a/scripts/gfp-translate
+++ b/scripts/gfp-translate
@@ -63,11 +63,11 @@ fi
 
 # Extract GFP flags from the kernel source
 TMPFILE=`mktemp -t gfptranslate-XXXXXX` || exit 1
-grep -q ___GFP $SOURCE/include/linux/gfp.h
+grep -q ___GFP $SOURCE/include/linux/gfp_types.h
 if [ $? -eq 0 ]; then
-	grep "^#define ___GFP" $SOURCE/include/linux/gfp.h | sed -e 's/u$//' | grep -v GFP_BITS > $TMPFILE
+	grep "^#define ___GFP" $SOURCE/include/linux/gfp_types.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
+	grep "^#define __GFP" $SOURCE/include/linux/gfp_types.h | sed -e 's/(__force gfp_t)//' | sed -e 's/u)/)/' | grep -v GFP_BITS | sed -e 's/)\//) \//' > $TMPFILE
 fi
 
 # Parse the flags
-- 
2.7.4


                 reply	other threads:[~2023-06-13  5:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1686633217-4397-1-git-send-email-quic_charante@quicinc.com \
    --to=quic_charante@quicinc.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@techsingularity.net \
    --cc=mingo@kernel.org \
    --cc=quic_pkondeti@quicinc.com \
    --cc=yury.norov@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®