summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-04-04 20:07:20 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2018-04-04 20:07:20 -0700
commit06dd3dfeea60e2a6457a6aedf97afc8e6d2ba497 (patch)
tree1d8b9efbd7cd3dbb5d7b7663d7fd2de61b26f453 /block
parent38047d5c269bbdedf900fc86954913f3dffa01f1 (diff)
parent86f690e8bfd124c38940e7ad58875ef383003348 (diff)
downloadlinux-06dd3dfeea60e2a6457a6aedf97afc8e6d2ba497.tar.bz2
Merge tag 'char-misc-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc updates from Greg KH: "Here is the big set of char/misc driver patches for 4.17-rc1. There are a lot of little things in here, nothing huge, but all important to the different hardware types involved: - thunderbolt driver updates - parport updates (people still care...) - nvmem driver updates - mei updates (as always) - hwtracing driver updates - hyperv driver updates - extcon driver updates - ... and a handful of even smaller driver subsystem and individual driver updates All of these have been in linux-next with no reported issues" * tag 'char-misc-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (149 commits) hwtracing: Add HW tracing support menu intel_th: Add ACPI glue layer intel_th: Allow forcing host mode through drvdata intel_th: Pick up irq number from resources intel_th: Don't touch switch routing in host mode intel_th: Use correct method of finding hub intel_th: Add SPDX GPL-2.0 header to replace GPLv2 boilerplate stm class: Make dummy's master/channel ranges configurable stm class: Add SPDX GPL-2.0 header to replace GPLv2 boilerplate MAINTAINERS: Bestow upon myself the care for drivers/hwtracing hv: add SPDX license id to Kconfig hv: add SPDX license to trace Drivers: hv: vmbus: do not mark HV_PCIE as perf_device Drivers: hv: vmbus: respect what we get from hv_get_synint_state() /dev/mem: Avoid overwriting "err" in read_mem() eeprom: at24: use SPDX identifier instead of GPL boiler-plate eeprom: at24: simplify the i2c functionality checking eeprom: at24: fix a line break eeprom: at24: tweak newlines eeprom: at24: refactor at24_probe() ...
Diffstat (limited to 'block')
-rw-r--r--block/genhd.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/block/genhd.c b/block/genhd.c
index 9656f9e9f99e..dc7e089373b9 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -308,19 +308,22 @@ 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
- * allocate any unused major number.
+ * @major: the requested major device number [1..BLKDEV_MAJOR_MAX-1]. 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
- * function returns zero on success, or a negative error code
+ * - if a major device number was requested in range [1..BLKDEV_MAJOR_MAX-1]
+ * 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..BLKDEV_MAJOR_MAX-1] or a negative error code otherwise
+ *
+ * See Documentation/admin-guide/devices.txt for the list of allocated
+ * major numbers.
*/
int register_blkdev(unsigned int major, const char *name)
{
@@ -347,8 +350,8 @@ int register_blkdev(unsigned int major, const char *name)
}
if (major >= BLKDEV_MAJOR_MAX) {
- pr_err("register_blkdev: major requested (%d) is greater than the maximum (%d) for %s\n",
- major, BLKDEV_MAJOR_MAX, name);
+ pr_err("register_blkdev: major requested (%u) is greater than the maximum (%u) for %s\n",
+ major, BLKDEV_MAJOR_MAX-1, name);
ret = -EINVAL;
goto out;
@@ -375,7 +378,7 @@ int register_blkdev(unsigned int major, const char *name)
ret = -EBUSY;
if (ret < 0) {
- printk("register_blkdev: cannot get major %d for %s\n",
+ printk("register_blkdev: cannot get major %u for %s\n",
major, name);
kfree(p);
}