Thread (5 messages) 5 messages, 1 author, 2024-10-22
DORMANTno replies

[PATCH 4/4] xdrgen: Remove program_stat_to_errno() call sites

From: Chuck Lever <cel@kernel.org>
Date: 2024-10-22 17:44:17
Subsystem: kernel nfsd, sunrpc, and lockd servers, networking [general], the rest · Maintainers: Chuck Lever, Jeff Layton, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

From: Chuck Lever <redacted>

Refactor: Translating an on-the-wire value to a local host errno is
architecturally a job for the proc function, not the XDR decoder.

Signed-off-by: Chuck Lever <redacted>
---
 .../xdrgen/templates/C/program/decoder/result.j2   |    2 --
 1 file changed, 2 deletions(-)
diff --git a/tools/net/sunrpc/xdrgen/templates/C/program/decoder/result.j2 b/tools/net/sunrpc/xdrgen/templates/C/program/decoder/result.j2
index 4ce4cc9fab79..aa9940e322db 100644
--- a/tools/net/sunrpc/xdrgen/templates/C/program/decoder/result.j2
+++ b/tools/net/sunrpc/xdrgen/templates/C/program/decoder/result.j2
@@ -13,8 +13,6 @@ static int {{ program }}_xdr_dec_{{ result }}(struct rpc_rqst *req,
 
 	if (!xdrgen_decode_{{ result }}(xdr, result))
 		return -EIO;
-	if (result->stat)
-		return {{ program }}_stat_to_errno(result->stat);
 {% endif %}
 	return 0;
 }

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help