Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

block: Use pr_info() instead of printk(KERN_INFO ...)

Switch to the modern style of printing kernel messages. Use %u instead
of %d to print unsigned integers.

Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Keith Busch <kbusch@kernel.org>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Link: https://lore.kernel.org/r/20231213194702.90381-1-bvanassche@acm.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Bart Van Assche and committed by
Jens Axboe
f19d1e3b 6f64f866

+4 -8
+4 -8
block/blk-settings.c
··· 127 127 128 128 if ((max_hw_sectors << 9) < PAGE_SIZE) { 129 129 max_hw_sectors = 1 << (PAGE_SHIFT - 9); 130 - printk(KERN_INFO "%s: set to minimum %d\n", 131 - __func__, max_hw_sectors); 130 + pr_info("%s: set to minimum %u\n", __func__, max_hw_sectors); 132 131 } 133 132 134 133 max_hw_sectors = round_down(max_hw_sectors, ··· 247 248 { 248 249 if (!max_segments) { 249 250 max_segments = 1; 250 - printk(KERN_INFO "%s: set to minimum %d\n", 251 - __func__, max_segments); 251 + pr_info("%s: set to minimum %u\n", __func__, max_segments); 252 252 } 253 253 254 254 q->limits.max_segments = max_segments; ··· 283 285 { 284 286 if (max_size < PAGE_SIZE) { 285 287 max_size = PAGE_SIZE; 286 - printk(KERN_INFO "%s: set to minimum %d\n", 287 - __func__, max_size); 288 + pr_info("%s: set to minimum %u\n", __func__, max_size); 288 289 } 289 290 290 291 /* see blk_queue_virt_boundary() for the explanation */ ··· 737 740 { 738 741 if (mask < PAGE_SIZE - 1) { 739 742 mask = PAGE_SIZE - 1; 740 - printk(KERN_INFO "%s: set to minimum %lx\n", 741 - __func__, mask); 743 + pr_info("%s: set to minimum %lx\n", __func__, mask); 742 744 } 743 745 744 746 q->limits.seg_boundary_mask = mask;