Re: [PATCH] block: correct comment for register_blkdev()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Wang Sheng-Hui <shhuiw@xxxxxxxxxxx> 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@xxxxxxxxxxx>

Acked-by: Jeff Moyer <jmoyer@xxxxxxxxxx>

> ---
>  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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux