mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: barebox@lists.infradead.org
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
Subject: [PATCH 2/2] block: Replace debug() with dev_dbg()
Date: Fri, 11 Jan 2019 21:58:15 -0800	[thread overview]
Message-ID: <20190112055815.12180-2-andrew.smirnov@gmail.com> (raw)
In-Reply-To: <20190112055815.12180-1-andrew.smirnov@gmail.com>

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>
---
 common/block.c | 11 ++++++-----
 1 file 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));
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2019-01-12  5:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-12  5:58 [PATCH 1/2] block: Alias block_op_close() to block_op_flush() Andrey Smirnov
2019-01-12  5:58 ` Andrey Smirnov [this message]
2019-01-16  7:29 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190112055815.12180-2-andrew.smirnov@gmail.com \
    --to=andrew.smirnov@gmail.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox