Re: [PATCH V3 1/3] block: add a zone condition debug helper

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

 



On 2020/03/25 13:31, Chaitanya Kulkarni wrote:
> On 03/24/2020 08:27 PM, Damien Le Moal wrote:
>>>   {
>>>> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
>>>> index 53a1325efbc3..0070f26b9579 100644
>>>> --- a/include/linux/blkdev.h
>>>> +++ b/include/linux/blkdev.h
>>>> @@ -887,6 +887,9 @@ extern void blk_execute_rq_nowait(struct request_queue *, struct gendisk *,
>>>>  /* Helper to convert REQ_OP_XXX to its string format XXX */
>>>>  extern const char *blk_op_str(unsigned int op);
>>>>
>>>> +/* Helper to convert BLK_ZONE_ZONE_XXX to its string format XXX */
>>>> +extern const char *blk_zone_cond_str(enum blk_zone_cond zone_cond);
>>>> +
>> I do not think that the extern is needed here. And I think that this declaration
>> should go under #ifdef CONFIG_BLK_DEV_ZONED since its code is compiled only if
>> that config option is enabled.
>>
> 
> Are you suggesting like following ?
> 
> +#ifdef CONFIG_BLK_DEV_ZONED
> +/* Helper to convert BLK_ZONE_ZONE_XXX to its string format XXX */
> +const char *blk_zone_cond_str(enum blk_zone_cond zone_cond);
> +#endif /* CONFIG_BLK_DEV_ZONED */

Yes, That is what I meant. But may be do not add another #ifdef and simply move
the declaration within one of the existing #ifdef CONFIG_BLK_DEV_ZONED in
blkdev.h ? Less #ifdef is always better :)



-- 
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