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] [thread-next>] [day] [month] [year] [list]
Message-ID: <YbCFkQZvIDLtPJTR@smile.fi.intel.com>
Date:   Wed, 8 Dec 2021 12:14:41 +0200
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Leon Romanovsky <leon@...nel.org>
Cc:     Greg KH <gregkh@...uxfoundation.org>,
        "David E. Box" <david.e.box@...ux.intel.com>, lee.jones@...aro.org,
        hdegoede@...hat.com, bhelgaas@...gle.com,
        srinivas.pandruvada@...el.com, shuah@...nel.org,
        mgross@...ux.intel.com, linux-kernel@...r.kernel.org,
        platform-driver-x86@...r.kernel.org,
        linux-kselftest@...r.kernel.org, linux-pci@...r.kernel.org
Subject: Re: [V2 2/6] driver core: auxiliary bus: Add driver data helpers

On Wed, Dec 08, 2021 at 11:12:20AM +0200, Leon Romanovsky wrote:
> On Wed, Dec 08, 2021 at 09:43:37AM +0100, Greg KH wrote:

...

> The idea that you have two APIs which do the same thing, one is
> obfuscated version of another.
> 
> If you don't want from people to use driver core function and structures,
> you shouldn't expose them in global headers.

For all these APIs the rationale is very simple. If you have callback that
takes a pointer to the container (*), you better use the APIs related to
this container (no need to have an explicit dereferencing). Otherwise you
use dev_*() APIs (when it's pointer to the pure struct device).

The value is to have coherent APIs around struct device containers.

*) under container here I assume the data structure that has the embedded
   struct device in it.

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ