From: Christian Brauner <christian.brauner@mailbox.org>
To: tj@kernel.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org
Cc: Christian Brauner <christian.brauner@mailbox.org>
Subject: [PATCH] let kernfs_name_locked & kernfs_name return size_t
Date: Wed, 10 Feb 2016 17:18:59 +0100 [thread overview]
Message-ID: <1455121139-4026-2-git-send-email-christian.brauner@mailbox.org> (raw)
In-Reply-To: <1455121139-4026-1-git-send-email-christian.brauner@mailbox.org>
They return the length of kn->parent or kn->name and should be aligned with
kernfs_path_len which also returns size_t.
Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
---
fs/kernfs/dir.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c
index 742bf4a..a3553b8 100644
--- a/fs/kernfs/dir.c
+++ b/fs/kernfs/dir.c
@@ -39,7 +39,7 @@ static bool kernfs_lockdep(struct kernfs_node *kn)
#endif
}
-static int kernfs_name_locked(struct kernfs_node *kn, char *buf, size_t buflen)
+static size_t kernfs_name_locked(struct kernfs_node *kn, char *buf, size_t buflen)
{
return strlcpy(buf, kn->parent ? kn->name : "/", buflen);
}
@@ -80,7 +80,7 @@ static char * __must_check kernfs_path_locked(struct kernfs_node *kn, char *buf,
*
* This function can be called from any context.
*/
-int kernfs_name(struct kernfs_node *kn, char *buf, size_t buflen)
+size_t kernfs_name(struct kernfs_node *kn, char *buf, size_t buflen)
{
unsigned long flags;
int ret;
--
2.7.0
next prev parent reply other threads:[~2016-02-10 16:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-10 16:18 [PATCH] let kernfs_name_locked & kernfs_name return size_t Christian Brauner
2016-02-10 16:18 ` Christian Brauner [this message]
2016-02-10 16:26 ` Tejun Heo
2016-02-10 16:41 ` kbuild test robot
2016-02-10 16:53 ` Greg KH
2016-02-10 17:12 ` Christian Brauner
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=1455121139-4026-2-git-send-email-christian.brauner@mailbox.org \
--to=christian.brauner@mailbox.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).