diff mbox series

[2/3] null_blk: fix module name at log message

Message ID 20190911144636.226945-2-andrealmeid@collabora.com (mailing list archive)
State New, archived
Headers show
Series [1/3] docs: block: null_blk: enhance document style | expand

Commit Message

André Almeida Sept. 11, 2019, 2:46 p.m. UTC
The name of the module is "null_blk", not "null". Make `pr_info()` follow
the pattern of `pr_err()` log messages.

Signed-off-by: André Almeida <andrealmeid@collabora.com>
---
 drivers/block/null_blk_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Ezequiel Garcia Sept. 12, 2019, 3:47 p.m. UTC | #1
Hi André, Jens,

On Wed, 2019-09-11 at 11:46 -0300, André Almeida wrote:
> The name of the module is "null_blk", not "null". Make `pr_info()` follow
> the pattern of `pr_err()` log messages.
> 

Instead of doing these fixes manually, it's more consistent and smarter
to use pr_fmt. There are many examples of drivers doing that.

I don't know if this patch can be dropped, and replaced with one used pr_fmt
or if doesn't worth the trouble.

It would be even better to also patch Documentation/process/coding-style.rst,
in particular the printing section, making a mention to pr_fmt.

Thanks,
Ezequiel
Jens Axboe Sept. 12, 2019, 8:47 p.m. UTC | #2
On 9/12/19 9:47 AM, Ezequiel Garcia wrote:
> Hi André, Jens,
> 
> On Wed, 2019-09-11 at 11:46 -0300, André Almeida wrote:
>> The name of the module is "null_blk", not "null". Make `pr_info()` follow
>> the pattern of `pr_err()` log messages.
>>
> 
> Instead of doing these fixes manually, it's more consistent and smarter
> to use pr_fmt. There are many examples of drivers doing that.
> 
> I don't know if this patch can be dropped, and replaced with one used pr_fmt
> or if doesn't worth the trouble.
> 
> It would be even better to also patch Documentation/process/coding-style.rst,
> in particular the printing section, making a mention to pr_fmt.

André, please address the comments in this email and from Willy. Note
that the previous patch is queued up, so you'll need to make it relative
to that.
André Almeida Sept. 12, 2019, 10:08 p.m. UTC | #3
On 9/12/19 5:47 PM, Jens Axboe wrote:
> On 9/12/19 9:47 AM, Ezequiel Garcia wrote:
>> Hi André, Jens,
>>
>> On Wed, 2019-09-11 at 11:46 -0300, André Almeida wrote:
>>> The name of the module is "null_blk", not "null". Make `pr_info()` follow
>>> the pattern of `pr_err()` log messages.
>>>
>>
>> Instead of doing these fixes manually, it's more consistent and smarter
>> to use pr_fmt. There are many examples of drivers doing that.
>>
>> I don't know if this patch can be dropped, and replaced with one used pr_fmt
>> or if doesn't worth the trouble.
>>
>> It would be even better to also patch Documentation/process/coding-style.rst,
>> in particular the printing section, making a mention to pr_fmt.
> 
> André, please address the comments in this email and from Willy. Note
> that the previous patch is queued up, so you'll need to make it relative
> to that.
> 

Ok Jens, I'll do it.
diff mbox series

Patch

diff --git a/drivers/block/null_blk_main.c b/drivers/block/null_blk_main.c
index 99328ded60d1..7bc553ff7407 100644
--- a/drivers/block/null_blk_main.c
+++ b/drivers/block/null_blk_main.c
@@ -1311,7 +1311,7 @@  static bool should_requeue_request(struct request *rq)
 
 static enum blk_eh_timer_return null_timeout_rq(struct request *rq, bool res)
 {
-	pr_info("null: rq %p timed out\n", rq);
+	pr_info("null_blk: rq %p timed out\n", rq);
 	blk_mq_complete_request(rq);
 	return BLK_EH_DONE;
 }
@@ -1803,7 +1803,7 @@  static int __init null_init(void)
 		}
 	}
 
-	pr_info("null: module loaded\n");
+	pr_info("null_blk: module loaded\n");
 	return 0;
 
 err_dev: