From: cel@kernel.org
To: Neil Brown <neilb@suse.de>, Jeff Layton <jlayton@kernel.org>,
Olga Kornievskaia <okorniev@redhat.com>,
Dai Ngo <dai.ngo@oracle.com>, Tom Talpey <tom@talpey.com>
Cc: <linux-nfs@vger.kernel.org>, Chuck Lever <chuck.lever@oracle.com>
Subject: [PATCH 4/6] xdrgen: Rename enum's declaration Jinja2 template
Date: Sun, 29 Sep 2024 20:50:14 -0400 [thread overview]
Message-ID: <20240930005016.13374-6-cel@kernel.org> (raw)
In-Reply-To: <20240930005016.13374-1-cel@kernel.org>
From: Chuck Lever <chuck.lever@oracle.com>
"close.j2" is a confusing name.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
tools/net/sunrpc/xdrgen/generators/enum.py | 2 +-
.../xdrgen/templates/C/enum/declaration/{close.j2 => enum.j2} | 0
2 files changed, 1 insertion(+), 1 deletion(-)
rename tools/net/sunrpc/xdrgen/templates/C/enum/declaration/{close.j2 => enum.j2} (100%)
diff --git a/tools/net/sunrpc/xdrgen/generators/enum.py b/tools/net/sunrpc/xdrgen/generators/enum.py
index 855e43f4ae38..e37b5c297821 100644
--- a/tools/net/sunrpc/xdrgen/generators/enum.py
+++ b/tools/net/sunrpc/xdrgen/generators/enum.py
@@ -18,7 +18,7 @@ class XdrEnumGenerator(SourceGenerator):
def emit_declaration(self, node: _XdrEnum) -> None:
"""Emit one declaration pair for an XDR enum type"""
if node.name in public_apis:
- template = self.environment.get_template("declaration/close.j2")
+ template = self.environment.get_template("declaration/enum.j2")
print(template.render(name=node.name))
def emit_definition(self, node: _XdrEnum) -> None:
diff --git a/tools/net/sunrpc/xdrgen/templates/C/enum/declaration/close.j2 b/tools/net/sunrpc/xdrgen/templates/C/enum/declaration/enum.j2
similarity index 100%
rename from tools/net/sunrpc/xdrgen/templates/C/enum/declaration/close.j2
rename to tools/net/sunrpc/xdrgen/templates/C/enum/declaration/enum.j2
--
2.46.2
next prev parent reply other threads:[~2024-09-30 0:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-30 0:50 [PATCH 0/6] Continued work on xdrgen cel
2024-09-30 0:50 ` [PATCH] NFSD: Remove unused function parameter cel
2024-09-30 0:50 ` [PATCH 1/6] xdrgen: Exit status should be zero on success cel
2024-09-30 0:50 ` [PATCH 2/6] xdrgen: Clean up type_specifier cel
2024-09-30 0:50 ` [PATCH 3/6] xdrgen: Rename "variable-length strings" cel
2024-09-30 0:50 ` cel [this message]
2024-09-30 0:50 ` [PATCH 5/6] xdrgen: Rename "enum yada" types as just "yada" cel
2024-09-30 0:50 ` [PATCH 6/6] xdrgen: Implement big-endian enums cel
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=20240930005016.13374-6-cel@kernel.org \
--to=cel@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=dai.ngo@oracle.com \
--cc=jlayton@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=okorniev@redhat.com \
--cc=tom@talpey.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