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]
Message-ID: <20180924211107.GA22824@google.com>
Date:   Mon, 24 Sep 2018 14:11:07 -0700
From:   Matthias Kaehlcke <mka@...omium.org>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Sakari Ailus <sakari.ailus@...ux.intel.com>,
        Marcin Wojtas <mw@...ihalf.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Sinan Kaya <okaya@...eaurora.org>,
        Marcel Holtmann <marcel@...tmann.org>,
        Johan Hedberg <johan.hedberg@...il.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-bluetooth@...r.kernel.org, bgodavar@...eaurora.org,
        Loic Poulain <loic.poulain@...aro.org>,
        Brian Norris <briannorris@...omium.org>
Subject: Re: [PATCH v2 1/2] device property: Add device_get_bd_address() and
 fwnode_get_bd_address()

Hi Andy,

thanks for your feedback!

On Mon, Sep 24, 2018 at 11:46:37PM +0300, Andy Shevchenko wrote:
> On Mon, Sep 24, 2018 at 10:36 PM Matthias Kaehlcke <mka@...omium.org> wrote:
> >
> > Provide an API for Bluetooth drivers to retrieve the Bluetooth Device
> > address (BD_ADDR) for a device. If the device node has a property
> > 'local-bd-address' the BD address is read from this property.
> 
> > diff --git a/include/linux/property.h b/include/linux/property.h
> > index ac8a1ebc4c1b..8926cf95d27e 100644
> > --- a/include/linux/property.h
> > +++ b/include/linux/property.h
> > @@ -15,6 +15,7 @@
> >
> >  #include <linux/fwnode.h>
> >  #include <linux/types.h>
> 
> > +#include <net/bluetooth/bluetooth.h>
> 
> Hmm... I don't understand why we need this complete header here.

Yes, this is what deterred me from passing bdaddr_t in the first place.

> If you are retrieving bdaddr_t type from it, so, better to move it to
> types.h first.

Sounds good to me if it is an acceptable solution to put something
bluetoothy in types.h.

> Sorry I didn't notice this before.
> 
> >  struct device;
> 
> > +int device_get_bd_address(struct device *dev, bdaddr_t *bd_addr);
> 
> > +int fwnode_get_bd_address(struct fwnode_handle *fwnode, bdaddr_t *bd_addr);
> 
> I don't remember if we discussed below...
> Since you put implementations under #ifdef, I'm not sure we can leave
> header w/o stubs for !CONFIG_BT case.
> I can imagine the case where some driver might use BT functionality
> optionally in which case this enforces ugly #ifdef in the driver.

To avoid another possible re-spin: do you prefer a single #ifdef, for
both device_get_bd_address() and fwnode_get_bd_address(), or keep the
strict grouping of device_*() and fwnode_*() functions?

Cheers

Matthias

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ