* [PATCH] NFSD: Clean up errors in nfs4xdr.c
@ 2023-10-13 6:39 KaiLong Wang
2023-10-13 10:50 ` Jeff Layton
0 siblings, 1 reply; 2+ messages in thread
From: KaiLong Wang @ 2023-10-13 6:39 UTC (permalink / raw)
To: chuck.lever, jlayton, neilb, kolga, Dai.Ngo, tom; +Cc: linux-nfs, linux-kernel
Fix the following errors reported by checkpatch:
ERROR: spaces required around that '=' (ctx:VxV)
ERROR: else should follow close brace '}'
Signed-off-by: KaiLong Wang <wangkailong@jari.cn>
---
fs/nfsd/nfs4xdr.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 1cbd2a392302..8b9707957649 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -2432,7 +2432,7 @@ nfsd4_decode_compound(struct nfsd4_compoundargs *argp)
{
struct nfsd4_op *op;
bool cachethis = false;
- int auth_slack= argp->rqstp->rq_auth_slack;
+ int auth_slack = argp->rqstp->rq_auth_slack;
int max_reply = auth_slack + 8; /* opcnt, status */
int readcount = 0;
int readbytes = 0;
@@ -2585,7 +2585,7 @@ static __be32 nfsd4_encode_components_esc(struct xdr_stream *xdr, char sep,
__be32 *p;
__be32 pathlen;
int pathlen_offset;
- int strlen, count=0;
+ int strlen, count = 0;
char *str, *end, *next;
dprintk("nfsd4_encode_components(%s)\n", components);
@@ -2622,8 +2622,7 @@ static __be32 nfsd4_encode_components_esc(struct xdr_stream *xdr, char sep,
return nfserr_resource;
p = xdr_encode_opaque(p, str, strlen);
count++;
- }
- else
+ } else
end++;
if (found_esc)
end = next;
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] NFSD: Clean up errors in nfs4xdr.c
2023-10-13 6:39 [PATCH] NFSD: Clean up errors in nfs4xdr.c KaiLong Wang
@ 2023-10-13 10:50 ` Jeff Layton
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Layton @ 2023-10-13 10:50 UTC (permalink / raw)
To: KaiLong Wang, chuck.lever, neilb, kolga, Dai.Ngo, tom
Cc: linux-nfs, linux-kernel
On Fri, 2023-10-13 at 14:39 +0800, KaiLong Wang wrote:
> Fix the following errors reported by checkpatch:
>
> ERROR: spaces required around that '=' (ctx:VxV)
> ERROR: else should follow close brace '}'
>
> Signed-off-by: KaiLong Wang <wangkailong@jari.cn>
> ---
> fs/nfsd/nfs4xdr.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
> index 1cbd2a392302..8b9707957649 100644
> --- a/fs/nfsd/nfs4xdr.c
> +++ b/fs/nfsd/nfs4xdr.c
> @@ -2432,7 +2432,7 @@ nfsd4_decode_compound(struct nfsd4_compoundargs *argp)
> {
> struct nfsd4_op *op;
> bool cachethis = false;
> - int auth_slack= argp->rqstp->rq_auth_slack;
> + int auth_slack = argp->rqstp->rq_auth_slack;
> int max_reply = auth_slack + 8; /* opcnt, status */
> int readcount = 0;
> int readbytes = 0;
> @@ -2585,7 +2585,7 @@ static __be32 nfsd4_encode_components_esc(struct xdr_stream *xdr, char sep,
> __be32 *p;
> __be32 pathlen;
> int pathlen_offset;
> - int strlen, count=0;
> + int strlen, count = 0;
> char *str, *end, *next;
>
> dprintk("nfsd4_encode_components(%s)\n", components);
> @@ -2622,8 +2622,7 @@ static __be32 nfsd4_encode_components_esc(struct xdr_stream *xdr, char sep,
> return nfserr_resource;
> p = xdr_encode_opaque(p, str, strlen);
> count++;
> - }
> - else
> + } else
> end++;
> if (found_esc)
> end = next;
In general, we don't usually take patches that just clean up whitespace
damage or stylistic problems. Doing so makes backporting harder as you
end up having to pull in extra patches to fix up minor differences
before bringing in substantive patches.
If you're fixing a real bug in the same area, then sure, go ahead and
fix up the style in the surrounding code, but if these patches don't
fix real bugs then I'd suggest not taking them.
--
Jeff Layton <jlayton@kernel.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-13 10:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-13 6:39 [PATCH] NFSD: Clean up errors in nfs4xdr.c KaiLong Wang
2023-10-13 10:50 ` Jeff Layton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox