mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
ANDROID: 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. The pr_fmt() format is added on top of the file to include __func__ in the pr_info() calls. Bug: 308663717 Bug: 319125789 Change-Id: I11dbb559263ae5ef18febc7ab89f27f231e511e2 Signed-off-by: Bart Van Assche <bvanassche@acm.org> [jyescas@google.com: define pr_fmt(fmt) to include __func__ in the output] Signed-off-by: Juan Yescas <jyescas@google.com>
This commit is contained in:
committed by
Juan Yescas
parent
326690739d
commit
05ee024443
@@ -2,6 +2,9 @@
|
|||||||
/*
|
/*
|
||||||
* Functions related to setting various queue properties from drivers
|
* Functions related to setting various queue properties from drivers
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define pr_fmt(fmt) "%s: " fmt, __func__
|
||||||
|
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
@@ -126,8 +129,7 @@ void blk_queue_max_hw_sectors(struct request_queue *q, unsigned int max_hw_secto
|
|||||||
|
|
||||||
if ((max_hw_sectors << 9) < PAGE_SIZE) {
|
if ((max_hw_sectors << 9) < PAGE_SIZE) {
|
||||||
max_hw_sectors = 1 << (PAGE_SHIFT - 9);
|
max_hw_sectors = 1 << (PAGE_SHIFT - 9);
|
||||||
printk(KERN_INFO "%s: set to minimum %d\n",
|
pr_info("set to minimum %u\n", max_hw_sectors);
|
||||||
__func__, max_hw_sectors);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
max_hw_sectors = round_down(max_hw_sectors,
|
max_hw_sectors = round_down(max_hw_sectors,
|
||||||
@@ -242,8 +244,7 @@ void blk_queue_max_segments(struct request_queue *q, unsigned short max_segments
|
|||||||
{
|
{
|
||||||
if (!max_segments) {
|
if (!max_segments) {
|
||||||
max_segments = 1;
|
max_segments = 1;
|
||||||
printk(KERN_INFO "%s: set to minimum %d\n",
|
pr_info("set to minimum %u\n", max_segments);
|
||||||
__func__, max_segments);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
q->limits.max_segments = max_segments;
|
q->limits.max_segments = max_segments;
|
||||||
@@ -279,8 +280,7 @@ void blk_queue_max_segment_size(struct request_queue *q, unsigned int max_size)
|
|||||||
{
|
{
|
||||||
if (max_size < PAGE_SIZE) {
|
if (max_size < PAGE_SIZE) {
|
||||||
max_size = PAGE_SIZE;
|
max_size = PAGE_SIZE;
|
||||||
printk(KERN_INFO "%s: set to minimum %d\n",
|
pr_info("set to minimum %u\n", max_size);
|
||||||
__func__, max_size);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* see blk_queue_virt_boundary() for the explanation */
|
/* see blk_queue_virt_boundary() for the explanation */
|
||||||
@@ -734,8 +734,7 @@ void blk_queue_segment_boundary(struct request_queue *q, unsigned long mask)
|
|||||||
{
|
{
|
||||||
if (mask < PAGE_SIZE - 1) {
|
if (mask < PAGE_SIZE - 1) {
|
||||||
mask = PAGE_SIZE - 1;
|
mask = PAGE_SIZE - 1;
|
||||||
printk(KERN_INFO "%s: set to minimum %lx\n",
|
pr_info("set to minimum %lx\n", mask);
|
||||||
__func__, mask);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
q->limits.seg_boundary_mask = mask;
|
q->limits.seg_boundary_mask = mask;
|
||||||
|
|||||||
Reference in New Issue
Block a user