From patchwork Mon Sep 30 00:50:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 13815296 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7C707C2E9 for ; Mon, 30 Sep 2024 00:50:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727657436; cv=none; b=fqV+FU0btac9fsMsK0Mlwd/9v0K4DgWQpgL/AphJ91MPHplU1/FrPqYQJ0Vb+4SbQBFH+0pnKmSadpn5G9hYjLdhC0bmPVKIZ+LvVSkMMPX3hHTGtM0Zdxb6/PCD2Dm9XoMoa94ESG2dA+7hkbgAdNfJierKPON4PGBYXJsDYaI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727657436; c=relaxed/simple; bh=dYxzd3/OQUWiOeTW8JHR0r93nRSuH5EV/PfR+YS2U50=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NfDWvOTkDKL6zHP4aRpWKw/l64M6cdf2e5LOnZ5u8fxQGKURH2Yq0eQop15A88tRWYAo8Dc/isBbhFFiJk+Zpu4iNaIQXhvztuIADdgYma29WUpYrULhWBTNxSRptr/aurDmS3dqRZfxWSUgdKq8z6seLuKwA9tk1aIWluE1daA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DvNissX1; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DvNissX1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 652C8C4CEC6; Mon, 30 Sep 2024 00:50:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1727657436; bh=dYxzd3/OQUWiOeTW8JHR0r93nRSuH5EV/PfR+YS2U50=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DvNissX1DnLgiHarnR6Kdg4TVkVcXNqIDjV4JA1ms/swCG4hcrdouz9Mc0p6OX8N/ hi+jJjAkjm/kvS18qz+bwjN3zYKXTyWOShY7D5vvorhbXMFecbDafG6+u2ELunv9og QNjSTo1Von4xFxoEmDYlRytcGEyvLj86v/6jXtkdOOuiK2otSMSXA2ysPIpNM01X49 bMdiVop++9JG03N0/8sqQT2mnXSaHGErXBRTXn8rzeXOoQxWQuf6KlYafZ0Ydm/Yrf k48dYp25HH5W79xa244BQZDwy3RxKszm7/9QOsDF0QL5aqCEIlSVD2vP6RuaOQWXyp gGMXySjEJ/AMA== From: cel@kernel.org To: Neil Brown , Jeff Layton , Olga Kornievskaia , Dai Ngo , Tom Talpey Cc: , Chuck Lever Subject: [PATCH 4/6] xdrgen: Rename enum's declaration Jinja2 template Date: Sun, 29 Sep 2024 20:50:14 -0400 Message-ID: <20240930005016.13374-6-cel@kernel.org> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20240930005016.13374-1-cel@kernel.org> References: <20240930005016.13374-1-cel@kernel.org> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Chuck Lever "close.j2" is a confusing name. Signed-off-by: Chuck Lever --- 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