[PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings

Jens Axboe axboe at kernel.dk
Thu Aug 27 18:24:26 EDT 2020


On 8/27/20 2:13 PM, Julia Lawall wrote:
> Use kobj_to_dev() instead of container_of()
> 
> Generated by: scripts/coccinelle/api/kobj_to_dev.cocci

Seem to see more of these, these days. I don't really like them, why not
just use container_of? The private bla_to_foo() helpers should go away,
they are actively hurting readability of the code imho.

-- 
Jens Axboe




More information about the Linux-nvme mailing list