All of lore.kernel.org
 help / color / mirror / Atom feed
From: chenguohua@jari.cn
To: neilb@suse.de, kolga@netapp.com, Dai.Ngo@oracle.com, tom@talpey.com
Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] nfsd: Clean up errors in nfs4idmap.c
Date: Fri, 13 Oct 2023 14:07:04 +0800 (GMT+08:00)	[thread overview]
Message-ID: <5ba63549.957.18b27a54514.Coremail.chenguohua@jari.cn> (raw)

Fix the following errors reported by checkpatch:

ERROR: spaces required around that '=' (ctx:VxW)
ERROR: code indent should use tabs where possible
ERROR: return is not a function, parentheses are not required

Signed-off-by: GuoHua Cheng <chenguohua@jari.cn>
---
 fs/nfsd/nfs4idmap.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/nfsd/nfs4idmap.c b/fs/nfsd/nfs4idmap.c
index 7a806ac13e31..4e65538a58f0 100644
--- a/fs/nfsd/nfs4idmap.c
+++ b/fs/nfsd/nfs4idmap.c
@@ -212,7 +212,7 @@ idtoname_parse(struct cache_detail *cd, char *buf, int buflen)
 
 	if (buf[buflen - 1] != '\n')
 		return (-EINVAL);
-	buf[buflen - 1]= '\0';
+	buf[buflen - 1] = '\0';
 
 	buf1 = kmalloc(PAGE_SIZE, GFP_KERNEL);
 	if (buf1 == NULL)
@@ -313,7 +313,7 @@ static void
 nametoid_request(struct cache_detail *cd, struct cache_head *ch, char **bpp,
     int *blen)
 {
- 	struct ent *ent = container_of(ch, struct ent, h);
+	struct ent *ent = container_of(ch, struct ent, h);
 
 	qword_add(bpp, blen, ent->authname);
 	qword_add(bpp, blen, ent->type == IDMAP_TYPE_GROUP ? "group" : "user");
@@ -381,7 +381,7 @@ nametoid_parse(struct cache_detail *cd, char *buf, int buflen)
 
 	if (buf[buflen - 1] != '\n')
 		return (-EINVAL);
-	buf[buflen - 1]= '\0';
+	buf[buflen - 1] = '\0';
 
 	buf1 = kmalloc(PAGE_SIZE, GFP_KERNEL);
 	if (buf1 == NULL)
@@ -431,7 +431,7 @@ nametoid_parse(struct cache_detail *cd, char *buf, int buflen)
 	error = 0;
 out:
 	kfree(buf1);
-	return (error);
+	return error;
 }
 
 
-- 
2.17.1

                 reply	other threads:[~2023-10-13  6:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=5ba63549.957.18b27a54514.Coremail.chenguohua@jari.cn \
    --to=chenguohua@jari.cn \
    --cc=Dai.Ngo@oracle.com \
    --cc=kolga@netapp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.