Re: [PATCH V3 3/6] block: use blk_op_str() in blk-mq-debugfs.c

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

 



On 6/18/19 8:28 AM, Bart Van Assche wrote:
> On 6/17/19 10:42 PM, Chaitanya Kulkarni wrote:
>> +	if (strcmp(op_str, "UNKNOWN") == 0)
>>    		seq_printf(m, "%d", op);
>> +	else
>> +		seq_printf(m, "%s", op_str);
> 
> My opinion about using strcmp() to check whether or not
> req_opf-to-string conversion succeeded is that this is ugly ...
> 
I didn't like that either, but I also don't want callers to repeat the 
string "UNKNOWN" or any other error string and return NULL from the
blk_top_str().

Do you have any suggestion or preference ?

> Bart.
> 





[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