VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Srivatsa S. Bhat <srivatsa@csail.mit.edu> 2018-02-05 18:25:27 -0800 committer: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2018-03-15 17:59:24 +0100 commit: f33ff110ef31bd250bb8a16cfc4e883aa2b36767 parent: 652d703b21eb1caf2673c10bd58e4b0121dc7c50
Commit Summary:
block, char_dev: Use correct format specifier for unsigned ints
Diffstat:
1 file changed, 2 insertions, 2 deletions
diff --git a/fs/char_dev.c b/fs/char_dev.c
index 33c938542160..a279c58fe360 100644
--- a/fs/char_dev.c
+++ b/fs/char_dev.c
@@ -121,8 +121,8 @@ __register_chrdev_region(unsigned int major, unsigned int baseminor,
 	}
 
 	if (major >= CHRDEV_MAJOR_MAX) {
-		pr_err("CHRDEV \"%s\" major requested (%d) is greater than the maximum (%d)\n",
-		       name, major, CHRDEV_MAJOR_MAX);
+		pr_err("CHRDEV \"%s\" major requested (%u) is greater than the maximum (%u)\n",
+		       name, major, CHRDEV_MAJOR_MAX-1);
 		ret = -EINVAL;
 		goto out;
 	}