public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: linux-kbuild@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Masahiro Yamada <masahiroy@kernel.org>
Subject: [PATCH 02/17] genksyms: rename cvar_qualifier to type_qualifier
Date: Tue, 14 Jan 2025 00:00:40 +0900	[thread overview]
Message-ID: <20250113150253.3097820-3-masahiroy@kernel.org> (raw)
In-Reply-To: <20250113150253.3097820-1-masahiroy@kernel.org>

I believe "cvar" stands for "Const, Volatile, Attribute, or Restrict".

This is called "type-qualifier" in K&R. [1]

Adopt this more generic naming.

No functional changes are intended.

[1] https://cs.wmich.edu/~gupta/teaching/cs4850/sumII06/The%20syntax%20of%20C%20in%20Backus-Naur%20form.htm

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

 scripts/genksyms/parse.y | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/scripts/genksyms/parse.y b/scripts/genksyms/parse.y
index 02f2f713ec5a..8f62b9f0d99c 100644
--- a/scripts/genksyms/parse.y
+++ b/scripts/genksyms/parse.y
@@ -223,7 +223,7 @@ storage_class_specifier:
 
 type_specifier:
 	simple_type_specifier
-	| cvar_qualifier
+	| type_qualifier
 	| TYPEOF_KEYW '(' parameter_declaration ')'
 	| TYPEOF_PHRASE
 
@@ -270,21 +270,21 @@ simple_type_specifier:
 	;
 
 ptr_operator:
-	'*' cvar_qualifier_seq_opt
+	'*' type_qualifier_seq_opt
 		{ $$ = $2 ? $2 : $1; }
 	;
 
-cvar_qualifier_seq_opt:
+type_qualifier_seq_opt:
 	/* empty */					{ $$ = NULL; }
-	| cvar_qualifier_seq
+	| type_qualifier_seq
 	;
 
-cvar_qualifier_seq:
-	cvar_qualifier
-	| cvar_qualifier_seq cvar_qualifier		{ $$ = $2; }
+type_qualifier_seq:
+	type_qualifier
+	| type_qualifier_seq type_qualifier		{ $$ = $2; }
 	;
 
-cvar_qualifier:
+type_qualifier:
 	CONST_KEYW | VOLATILE_KEYW | ATTRIBUTE_PHRASE
 	| RESTRICT_KEYW
 		{ /* restrict has no effect in prototypes so ignore it */
-- 
2.43.0


  parent reply	other threads:[~2025-01-13 15:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-13 15:00 [PATCH 00/17] genksyms: fix conflicts and syntax errors in parser Masahiro Yamada
2025-01-13 15:00 ` [PATCH 01/17] genksyms: rename m_abstract_declarator to abstract_declarator Masahiro Yamada
2025-01-13 15:00 ` Masahiro Yamada [this message]
2025-01-13 15:00 ` [PATCH 03/17] genksyms: reduce type_qualifier directly to decl_specifier Masahiro Yamada
2025-01-13 15:00 ` [PATCH 04/17] genksyms: fix 6 shift/reduce conflicts and 5 reduce/reduce conflicts Masahiro Yamada
2025-01-14  1:23   ` Masahiro Yamada
2025-01-13 15:00 ` [PATCH 05/17] genksyms: fix last 3 shift/reduce conflicts Masahiro Yamada
2025-01-13 15:00 ` [PATCH 06/17] genksyms: remove Makefile hack Masahiro Yamada
2025-01-13 15:00 ` [PATCH 07/17] genksyms: restrict direct-abstract-declarator to take one parameter-type-list Masahiro Yamada
2025-01-13 15:00 ` [PATCH 08/17] genksyms: restrict direct-declarator " Masahiro Yamada
2025-01-13 15:00 ` [PATCH 09/17] genksyms: record attributes consistently for init-declarator Masahiro Yamada
2025-01-13 15:00 ` [PATCH 10/17] genksyms: decouple ATTRIBUTE_PHRASE from type-qualifier Masahiro Yamada
2025-01-13 15:00 ` [PATCH 11/17] genksyms: fix syntax error for attribute before abstract_declarator Masahiro Yamada
2025-01-13 15:00 ` [PATCH 12/17] genksyms: fix syntax error for attribute before nested_declarator Masahiro Yamada
2025-01-13 15:00 ` [PATCH 13/17] genksyms: fix syntax error for attribute after abstact_declarator Masahiro Yamada
2025-01-13 15:00 ` [PATCH 14/17] genksyms: fix syntax error for attribute after 'struct' Masahiro Yamada
2025-01-13 15:00 ` [PATCH 15/17] genksyms: fix syntax error for attribute after 'union' Masahiro Yamada
2025-01-13 15:00 ` [PATCH 16/17] genksyms: fix syntax error for builtin (u)int*x*_t types Masahiro Yamada
2025-01-13 15:00 ` [PATCH 17/17] genksyms: fix syntax error for attribute before init-declarator Masahiro Yamada
2025-01-14 20:33 ` [PATCH 00/17] genksyms: fix conflicts and syntax errors in parser Nicolas Schier

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=20250113150253.3097820-3-masahiroy@kernel.org \
    --to=masahiroy@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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