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]
Date:   Sun, 11 Mar 2018 19:24:18 +0100
From:   Hans de Goede <hdegoede@...hat.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Darren Hart <dvhart@...radead.org>,
        Andy Shevchenko <andy@...radead.org>,
        MyungJoo Ham <myungjoo.ham@...sung.com>,
        Chanwoo Choi <cw00.choi@...sung.com>,
        Mathias Nyman <mathias.nyman@...el.com>,
        Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
        Guenter Roeck <linux@...ck-us.net>,
        platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-usb@...r.kernel.org
Subject: Re: [PATCH v6 01/12] drivers: base: Unified device connection lookup

Hi all,

On 09-03-18 18:53, Greg Kroah-Hartman wrote:
> On Fri, Mar 02, 2018 at 11:20:46AM +0100, Hans de Goede wrote:
>> From: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
>>
>> Several frameworks - clk, gpio, phy, pmw, etc. - maintain
>> lookup tables for describing connections and provide custom
>> API for handling them. This introduces a single generic
>> lookup table and API for the connections.
>>
>> The motivation for this commit is centralizing the
>> connection lookup, but the goal is to ultimately extract the
>> connection descriptions also from firmware by using the
>> fwnode_graph_* functions and other mechanisms that are
>> available.
>>
>> Signed-off-by: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
>> Reviewed-by: Hans de Goede <hdegoede@...hat.com>
>> Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>
>> Signed-off-by: Hans de Goede <hdegoede@...hat.com>
> 
> Sorry for the delay, just now reviewing this patch...
> 
> The content is fine (if not scary for the obvious reason of passing
> around 'struct device' of different bus types, but ok...), but the api
> naming is "rough":


Heikki, I think it is best if you answer Greg's remarks. FWIW I'm
fine with the changes Greg proposes.

I currently have significantly less bandwidth for this due to
personal circumstances, so if a new version of this patch-set
is necessary it would be great if you (Heikki) can do a v7.

Regards,

Hans

> 
>> --- /dev/null
>> +++ b/include/linux/connection.h
> 
> "connection.h" is vague, why not just put this in device.h? >
>> @@ -0,0 +1,34 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +
>> +#ifndef _LINUX_CONNECTION_H_
>> +#define _LINUX_CONNECTION_H_
>> +
>> +#include <linux/list.h>
>> +
>> +struct device;
>> +
>> +/**
>> + * struct devcon - Device Connection Descriptor
>> + * @endpoint: The names of the two devices connected together
>> + * @id: Unique identifier for the connection
>> + * @list: List head, private for devcon internal use only
>> + */
>> +struct devcon {
> 
> 'struct device_connection'?  Spell it out please, people might think
> this is a "developer conference" :)
> 
>> +	const char		*endpoint[2];
>> +	const char		*id;
>> +	struct list_head	list;
>> +};
>> +
>> +void *__device_find_connection(struct device *dev, const char *con_id,
>> +			       void *data,
>> +			       void *(*match)(struct devcon *con, int ep,
>> +					      void *data));
> 
> Ick, __* functions are usually "no lock needed", but here you are doing
> a lot "more" than the normal device_find_connection() call.  Why not
> make this:
> 	device_connection_find_match()?
> 
>> +
>> +struct device *device_find_connection(struct device *dev, const char *con_id);
> 
> device_connection_find()?
> 
>> +
>> +#define DEVCON(_ep0, _ep1, _id)    (struct devcon) { { _ep0, _ep1 }, _id, }
> 
> Can you use named identifiers here?
> 
>> +
>> +void add_device_connection(struct devcon *con);
>> +void remove_device_connection(struct devcon *con);
> 
> device_connection_add() and device_connection_remove()?
> 
> I can make the api name changes in an add-on patch.
> 
> thanks,
> 
> greg k-h
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ