lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 4 Sep 2020 09:17:29 -0600
From:   Jens Axboe <axboe@...com>
To:     Xianting Tian <tian.xianting@....com>, <kbusch@...nel.org>,
        <hch@....de>, <sagi@...mberg.me>
CC:     <linux-kernel@...r.kernel.org>, <linux-nvme@...ts.infradead.org>
Subject: Re: [PATCH] nvme: use kobj_to_dev() to get device

On 9/4/20 9:01 AM, Xianting Tian wrote:
> We already has the interface kobj_to_dev(), which can be used to get
> 'struct device *' from kobj, so use it.

Let's please not, this is immediately obvious what it does:

struct device *dev = container_of(kobj, struct device, kobj);

while this one is totally not:

struct device *dev = kobj_to_dev(kobj);

Any sort of privte whatever_to_foo() should be removed from the tree,
imho.

-- 
Jens Axboe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ