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

From: 周传高
Date: Sat Jun 19 2021 - 01:27:36 EST



>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