]> git.baikalelectronics.ru Git - kernel.git/commit
block, char_dev: Use correct format specifier for unsigned ints
authorSrivatsa S. Bhat <srivatsa@csail.mit.edu>
Tue, 6 Feb 2018 02:25:27 +0000 (18:25 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Mar 2018 16:59:24 +0000 (17:59 +0100)
commit6ab6053aa9b3dce239bd1f712c3750ce730753de
treef3badb24cc0bfb74515d6ac73d2d74593734121a
parentd6f784d1d1389f848640ccff7957332970a674d1
block, char_dev: Use correct format specifier for unsigned ints

register_blkdev() and __register_chrdev_region() treat the major
number as an unsigned int. So print it the same way to avoid
absurd error statements such as:
"... major requested (-1) is greater than the maximum (511) ..."
(and also fix off-by-one bugs in the error prints).

While at it, also update the comment describing register_blkdev().

Signed-off-by: Srivatsa S. Bhat <srivatsa@csail.mit.edu>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
block/genhd.c
fs/char_dev.c