summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2019-01-11 21:58:15 -0800
committerSascha Hauer <s.hauer@pengutronix.de>2019-01-18 09:43:27 +0100
commitc19b36aeb723493489ed84930824b65712906dae (patch)
treedf0ceeb0be8f8d005af240cba51bc31619bdbe47
parent9102efae6ab7d8ee2607b842f2cdf6cbffaadb86 (diff)
downloadbarebox-c19b36aeb723493489ed84930824b65712906dae.tar.gz
barebox-c19b36aeb723493489ed84930824b65712906dae.tar.xz
block: Replace debug() with dev_dbg()
All of the functions using debug() in that file have enough info to use dev_dbg instead. Convert all of the uses of debug() to dev_dbg() in order to get more informative debug output. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--common/block.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/common/block.c b/common/block.c
index 549df71a9d..35173c65f1 100644
--- a/common/block.c
+++ b/common/block.c
@@ -76,7 +76,8 @@ static struct chunk *chunk_get_cached(struct block_device *blk, int block)
list_for_each_entry(chunk, &blk->buffered_blocks, list) {
if (block >= chunk->block_start &&
block < chunk->block_start + blk->rdbufsize) {
- debug("%s: found %d in %d\n", __func__, block, chunk->num);
+ dev_dbg(blk->dev, "%s: found %d in %d\n", __func__,
+ block, chunk->num);
/*
* move most recently used entry to the head of the list
*/
@@ -153,8 +154,8 @@ static int block_cache(struct block_device *blk, int block)
chunk->block_start = block & ~blk->blkmask;
- debug("%s: %d to %d\n", __func__, chunk->block_start,
- chunk->num);
+ dev_dbg(blk->dev, "%s: %d to %d\n", __func__, chunk->block_start,
+ chunk->num);
num_blocks = min(blk->rdbufsize, blk->num_blocks - chunk->block_start);
@@ -364,8 +365,8 @@ int blockdevice_register(struct block_device *blk)
INIT_LIST_HEAD(&blk->idle_blocks);
blk->blkmask = blk->rdbufsize - 1;
- debug("%s: rdbufsize: %d blockbits: %d blkmask: 0x%08x\n", __func__, blk->rdbufsize, blk->blockbits,
- blk->blkmask);
+ dev_dbg(blk->dev, "rdbufsize: %d blockbits: %d blkmask: 0x%08x\n",
+ blk->rdbufsize, blk->blockbits, blk->blkmask);
for (i = 0; i < 32; i++) {
struct chunk *chunk = xzalloc(sizeof(*chunk));