Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

xdrgen: Address some checkpatch whitespace complaints

This is a roll-up of three template fixes that eliminate noise from
checkpatch output so that it's easier to spot non-trivial problems.

To follow conventional kernel C style, when a union declaration is
marked with "pragma public", there should be a blank line between
the emitted "union xxx { ... };" and the decoder and encoder
function declarations.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

+3 -1
-1
tools/net/sunrpc/xdrgen/templates/C/enum/declaration/enum.j2
··· 1 1 {# SPDX-License-Identifier: GPL-2.0 #} 2 - 3 2 bool xdrgen_decode_{{ name }}(struct xdr_stream *xdr, {{ name }} *ptr); 4 3 bool xdrgen_encode_{{ name }}(struct xdr_stream *xdr, {{ name }} value);
+1
tools/net/sunrpc/xdrgen/templates/C/enum/definition/close.j2
··· 1 1 {# SPDX-License-Identifier: GPL-2.0 #} 2 2 }; 3 + 3 4 typedef enum {{ name }} {{ name }};
+1
tools/net/sunrpc/xdrgen/templates/C/enum/definition/close_be.j2
··· 1 1 {# SPDX-License-Identifier: GPL-2.0 #} 2 2 }; 3 + 3 4 typedef __be32 {{ name }};
+1
tools/net/sunrpc/xdrgen/templates/C/union/definition/close.j2
··· 3 3 }; 4 4 {%- if name in public_apis %} 5 5 6 + 6 7 bool xdrgen_decode_{{ name }}(struct xdr_stream *xdr, struct {{ name }} *ptr); 7 8 bool xdrgen_encode_{{ name }}(struct xdr_stream *xdr, const struct {{ name }} *ptr); 8 9 {%- endif -%}