Linux kbuild/kconfig development
 help / color / mirror / Atom feed
* [PATCH] genksyms: factor out APP for the ST_NORMAL state
@ 2025-02-05 17:45 Masahiro Yamada
  0 siblings, 0 replies; only message in thread
From: Masahiro Yamada @ 2025-02-05 17:45 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Masahiro Yamada

For the ST_NORMAL state, APP is called regardless of the token type.
Factor it out.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 scripts/genksyms/lex.l | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/scripts/genksyms/lex.l b/scripts/genksyms/lex.l
index 22aeb57649d9..f81033af1528 100644
--- a/scripts/genksyms/lex.l
+++ b/scripts/genksyms/lex.l
@@ -176,10 +176,10 @@ repeat:
   switch (lexstate)
     {
     case ST_NORMAL:
+      APP;
       switch (token)
 	{
 	case IDENT:
-	  APP;
 	  {
 	    int r = is_reserved_word(yytext, yyleng);
 	    if (r >= 0)
@@ -224,13 +224,11 @@ repeat:
 	  break;
 
 	case '[':
-	  APP;
 	  lexstate = ST_BRACKET;
 	  count = 1;
 	  goto repeat;
 
 	case '{':
-	  APP;
 	  if (dont_want_brace_phrase)
 	    break;
 	  lexstate = ST_BRACE;
@@ -238,12 +236,10 @@ repeat:
 	  goto repeat;
 
 	case '=': case ':':
-	  APP;
 	  lexstate = ST_EXPRESSION;
 	  break;
 
 	default:
-	  APP;
 	  break;
 	}
       break;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-02-05 17:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-05 17:45 [PATCH] genksyms: factor out APP for the ST_NORMAL state Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox