From: Chengguang Xu <cgxu519@gmx.com>
To: gregkh@linuxfoundation.org, dan.carpenter@oracle.com
Cc: linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk,
linux-kernel@vger.kernel.org, Chengguang Xu <cgxu519@gmx.com>
Subject: [PATCH v3 4/4] chardev: update comment based on the code
Date: Fri, 5 Apr 2019 19:27:11 +0800 [thread overview]
Message-ID: <20190405112711.25275-4-cgxu519@gmx.com> (raw)
In-Reply-To: <20190405112711.25275-1-cgxu519@gmx.com>
The function comment of __register_chrdev_region()
is out of date, so update it based on the code.
Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
---
v1->v2:
- Split fix and cleanup patches.
- Remove printing minor range in chrdev_show().
fs/char_dev.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/fs/char_dev.c b/fs/char_dev.c
index 47fd0561b03d..00dfe17871ac 100644
--- a/fs/char_dev.c
+++ b/fs/char_dev.c
@@ -88,13 +88,10 @@ static int find_dynamic_major(void)
/*
* Register a single major with a specified minor range.
*
- * If major == 0 this functions will dynamically allocate a major and return
- * its number.
- *
- * If major > 0 this function will attempt to reserve the passed range of
- * minors and will return zero on success.
+ * If major == 0 this function will dynamically allocate an unused major.
+ * If major > 0 this function will attempt to reserve the range of minors
+ * with given major.
*
- * Returns a -ve errno on failure.
*/
static struct char_device_struct *
__register_chrdev_region(unsigned int major, unsigned int baseminor,
--
2.20.1
next prev parent reply other threads:[~2019-04-05 11:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-05 11:27 [PATCH v3 1/4] chardev: add additional check for minor range overlap Chengguang Xu
2019-04-05 11:27 ` [PATCH v3 2/4] chardev: add a check for given minor range Chengguang Xu
2019-04-05 11:27 ` [PATCH v3 3/4] chardev: code cleanup for __register_chrdev_region() Chengguang Xu
2019-04-05 12:32 ` Greg KH
2019-04-05 12:52 ` Chengguang Xu
2019-04-05 11:27 ` Chengguang Xu [this message]
2019-04-05 12:32 ` [PATCH v3 1/4] chardev: add additional check for minor range overlap Greg KH
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=20190405112711.25275-4-cgxu519@gmx.com \
--to=cgxu519@gmx.com \
--cc=dan.carpenter@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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).