[PATCH 5/5] nvme-fabrics: set ret to -ENODEV for error case

Chaitanya Kulkarni chaitanyak at nvidia.com
Tue Jan 18 23:40:05 PST 2022


>>> I missed the discussion on this. Doesn't the __nvmf_concat_opt_tokens()
>>> already return parameters that indicate to the caller that no controller
>>> was found?
>>>
>>
>> The function I found in the repo returns nothing, is that the one you
>> are referring to ?
>>
>> static void __nvmf_concat_opt_tokens(struct seq_file *seq_file)
> 
> This is the path that Hannes added for userspace to detect kernel
> capabilities. So probably its not appropriate to return an error
> here, but rather take care of the original warning instead.

When I look at the code it looks unconventional to not return
error when controller not found case, why is it not appropriate
to return error can you please explain ?

Can we add a meaningful comment to avoid future such patches.



More information about the Linux-nvme mailing list