Re:Re: [PATCH] drivers/nvme/host: Use kobj_to_dev() API

周传高 zhouchuangao at vivo.com
Fri Jun 18 22:01:34 PDT 2021


>On Fri, Jun 18, 2021 at 07:10:58AM -0700, zhouchuangao wrote:
>> Use kobj_to_dev() API instead of container_of().
>
>Why?  That just makes the code harder to read.

In my opinion, the kobj_to_dev() interface is provided by the kernel so that
we can get device based on kobj without having to pass more parameters.
I think it's easier to use.

Thansk,
zhouchaungao



More information about the Linux-nvme mailing list