[PATCH] nvme: add comment to not use kobj_to_dev()

Christoph Hellwig hch at lst.de
Sun Jun 20 22:32:51 PDT 2021


On Sun, Jun 20, 2021 at 08:09:40PM -0700, Chaitanya Kulkarni wrote:
> Add a comment in nvme_ns_id_attrs_are_visible() and
> nvme_dev_attrs_are_visible() not to replace container_of() with
> kobj_to_dev(). Since use of kobj_to_dev() makes code harder to read.
> 
> Suggested-by: Keith Busch <kbusch at kernel.org>
> Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>

Err, no.  This code is completely obvious as is, and if people keep
sending these stupid patches we need to start blacklisting them.



More information about the Linux-nvme mailing list