Messages in this thread | | | Subject | Re:Re: [PATCH] drivers/nvme/host: Use kobj to dev() API | From | 周传高 <> | Date | Sat, 19 Jun 2021 13:01:34 +0800 (GMT+08:00) |
| |
>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
| |