lkml.org 
[lkml]   [2020]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH] Update the obsolete comments of 'register_blkdev' func
From the code of 'register_blkdev(...)', the major number range

should be in [1..BLKDEV_MAJOR_HASH_SIZE-1] while not [1..BLKDEV_MAJOR_MAX]

in case of calling 'register_blkdev(...) with @major = 0, so correct

the wrong info of the function's comments


Signed-off-by: Richard Clark <richard.xnu.clark@gmail.com>

Cc: Jens Axboe <axboe@kernel.dk>

Cc: xuesong chen <xuesong.cxs@alibaba-inc.com>

---

block/genhd.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)


diff --git a/block/genhd.c b/block/genhd.c

index 8b1e9f48957c..db73aa852434 100644

--- a/block/genhd.c

+++ b/block/genhd.c

@@ -429,7 +429,7 @@ void blkdev_show(struct seq_file *seqf, off_t offset)

* 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..BLKDEV_MAJOR_MAX-1] or a negative error code otherwise
+ * [1..BLKDEV_MAJOR_HASH_SIZE-1] or a negative error code otherwise

*

* See Documentation/admin-guide/devices.txt for the list of allocated

* major numbers.

--

2.17.1

\
 
 \ /
  Last update: 2020-07-23 07:17    [W:0.110 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site