@@ -180,7 +180,7 @@ void blkdev_show(struct seq_file *seqf, off_t offset)
spin_lock(&major_names_spinlock);
for (dp = major_names[major_to_index(offset)]; dp; dp = dp->next)
if (dp->major == offset)
- seq_printf(seqf, "%3d %s\n", dp->major, dp->name);
+ seq_printf(seqf, "%3u %s\n", dp->major, dp->name);
spin_unlock(&major_names_spinlock);
}
#endif /* CONFIG_PROC_FS */
@@ -896,7 +896,7 @@ static ssize_t disk_range_show(struct device *dev,
{
struct gendisk *disk = dev_to_disk(dev);
- return sprintf(buf, "%d\n", disk->minors);
+ return sprintf(buf, "%u\n", disk->minors);
}
static ssize_t disk_ext_range_show(struct device *dev,
@@ -130,9 +130,9 @@ struct gendisk {
* major/first_minor/minors should not be set by any new driver, the
* block core will take care of allocating them automatically.
*/
- int major;
- int first_minor;
- int minors;
+ unsigned int major;
+ unsigned int first_minor;
+ unsigned int minors;
char disk_name[DISK_NAME_LEN]; /* name of major driver */
... thus mark the major, first_minor and minors fields in struct gendisk as such. Signed-off-by: Christoph Hellwig <hch@lst.de> --- block/genhd.c | 4 ++-- include/linux/blkdev.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-)