diff mbox

block: correct comment for register_blkdev()

Message ID 1454162945-5897-1-git-send-email-shhuiw@foxmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Shenghui Wang Jan. 30, 2016, 2:09 p.m. UTC
Current max block major is 254, corresponding to 255 elements in
major_names. Correct the comment of register_blkdev() to reflect
the real range.

Signed-off-by: Wang Sheng-Hui <shhuiw@foxmail.com>
---
 block/genhd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Jeff Moyer Feb. 1, 2016, 4:46 p.m. UTC | #1
Wang Sheng-Hui <shhuiw@foxmail.com> writes:

> Current max block major is 254, corresponding to 255 elements in
> major_names. Correct the comment of register_blkdev() to reflect
> the real range.
>
> Signed-off-by: Wang Sheng-Hui <shhuiw@foxmail.com>

Acked-by: Jeff Moyer <jmoyer@redhat.com>

> ---
>  block/genhd.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/block/genhd.c b/block/genhd.c
> index 9f42526..2a733a6 100644
> --- a/block/genhd.c
> +++ b/block/genhd.c
> @@ -271,18 +271,18 @@ void blkdev_show(struct seq_file *seqf, off_t offset)
>  /**
>   * register_blkdev - register a new block device
>   *
> - * @major: the requested major device number [1..255]. If @major=0, try to
> + * @major: the requested major device number [0..254]. If @major=0, try to
>   *         allocate any unused major number.
>   * @name: the name of the new block device as a zero terminated string
>   *
>   * The @name must be unique within the system.
>   *
>   * The return value depends on the @major input parameter.
> - *  - if a major device number was requested in range [1..255] then the
> + *  - if a major device number was requested in range [1..254] then the
>   *    function returns zero on success, or a negative error code
>   *  - if any unused major number was requested with @major=0 parameter
>   *    then the return value is the allocated major number in range
> - *    [1..255] or a negative error code otherwise
> + *    [1..254] or a negative error code otherwise
>   */
>  int register_blkdev(unsigned int major, const char *name)
>  {
--
To unsubscribe from this list: send the line "unsubscribe linux-block" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/block/genhd.c b/block/genhd.c
index 9f42526..2a733a6 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -271,18 +271,18 @@  void blkdev_show(struct seq_file *seqf, off_t offset)
 /**
  * register_blkdev - register a new block device
  *
- * @major: the requested major device number [1..255]. If @major=0, try to
+ * @major: the requested major device number [0..254]. If @major=0, try to
  *         allocate any unused major number.
  * @name: the name of the new block device as a zero terminated string
  *
  * The @name must be unique within the system.
  *
  * The return value depends on the @major input parameter.
- *  - if a major device number was requested in range [1..255] then the
+ *  - if a major device number was requested in range [1..254] then the
  *    function returns zero on success, or a negative error code
  *  - if any unused major number was requested with @major=0 parameter
  *    then the return value is the allocated major number in range
- *    [1..255] or a negative error code otherwise
+ *    [1..254] or a negative error code otherwise
  */
 int register_blkdev(unsigned int major, const char *name)
 {