Re: [PATCH] zbd: Restore check_swd()

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

 



Jens,

On 2018/09/28 12:53, Jens Axboe wrote:
> On 9/26/18 8:16 PM, Damien Le Moal wrote:
>> As check_swd() is useful for debugging, revert its removal done with
>> commit d60be7d51cbb ("zbd: Remove unused function and variable").
> 
> The problem with dead code is that it's often forgotten when
> other changes are made, and then it doesn't even compile or
> work anymore.
> 
> I'd be happier if this was dependent on some debug static
> bool instead, ala:
> 
> static bool zbd_debug;
> 
> And then have check_swd() do
> 
> if (!zbd_debug)
>     return;
> 
> instead of hiding everything behind an #if 0.

OK. No problem. I will update and send a v2.

(and another patch to fix the incorrect comments signaled by Bart)

Thanks !


-- 
Damien Le Moal
Western Digital Research




[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux