Re: [PATCH v2 3/4] block: null_blk: Cleanup messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/20/22 12:57, Chaitanya Kulkarni wrote:
> On 4/19/22 17:57, Damien Le Moal wrote:
>> Use the pr_fmt() macro to prefix all null_blk pr_xxx() messages with
>> "null_blk:" to clarify which module is printing the messages. Also add
>> a pr_info() message in null_add_dev() to print the name of a newly
>> created disk.
>>
>> Signed-off-by: Damien Le Moal <damien.lemoal@xxxxxxxxxxxxxxxxxx>
>> ---
> 
> why not [1] to keep #define pr_fmt at one place in header file
> instead of duplicating it in zoned.c main.c  ?
> 
> irrespective of that, looks good.
> 
> Reviewed-by: Chaitanya Kulkarni <kch@xxxxxxxxxx>
> 
> -ck
> 
> 
> [1]
> 
> diff --git a/drivers/block/null_blk/null_blk.h 
> b/drivers/block/null_blk/null_blk.h
> index 78eb56b0ca55..450849fb3038 100644
> --- a/drivers/block/null_blk/null_blk.h
> +++ b/drivers/block/null_blk/null_blk.h
> @@ -167,4 +167,8 @@ static inline size_t null_zone_valid_read_len(struct 
> nullb *nullb,
>   }
>   #define null_report_zones      NULL
>   #endif /* CONFIG_BLK_DEV_ZONED */
> +
> +#undef pr_fmt
> +#define pr_fmt(fmt)    "null_blk: " fmt
> +
>   #endif /* __NULL_BLK_H */

Right, could do that. Jens ? Do you want an update for this ?

-- 
Damien Le Moal
Western Digital Research



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux