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: <e2fa6b56-965d-74e7-af2f-77baf0f50901@linaro.org>
Date:   Thu, 16 Nov 2017 13:40:05 +0000
From:   Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
To:     Vinod Koul <vinod.koul@...el.com>
Cc:     gregkh@...uxfoundation.org, broonie@...nel.org,
        alsa-devel@...a-project.org, mark.rutland@....com,
        michael.opdenacker@...e-electrons.com, poeschel@...onage.de,
        andreas.noever@...il.com, arnd@...db.de, bp@...e.de,
        devicetree@...r.kernel.org, james.hogan@...tec.com,
        pawel.moll@....com, linux-arm-msm@...r.kernel.org,
        sharon.dvir1@...l.huji.ac.il, robh+dt@...nel.org,
        sdharia@...eaurora.org, alan@...ux.intel.com, treding@...dia.com,
        mathieu.poirier@...aro.org, jkosina@...e.cz,
        linux-kernel@...r.kernel.org, daniel@...ll.ch, joe@...ches.com,
        davem@...emloft.net
Subject: Re: [alsa-devel] [PATCH v7 03/13] slimbus: Add SLIMbus bus type

Thanks for the review.

On 16/11/17 13:18, Vinod Koul wrote:
> On Wed, Nov 15, 2017 at 02:10:33PM +0000, srinivas.kandagatla@...aro.org wrote:
> 
>> +menuconfig SLIMBUS
>> +	tristate "Slimbus support"
>> +	help
>> +	  Slimbus is standard interface between System-on-Chip and audio codec,
>> +	  and other peripheral components in typical embedded systems.
>> +
>> +	  If unsure, choose N.
>> +
>> +if SLIMBUS
>> +
>> +# SlIMbus controllers
> 
> Slimbus perhaps?
> 
slimbus is specified as "SLIMbus" in the mipi specs, so I should 
probably stay with it and make it consistent across the patchset.


>> +static int slim_device_match(struct device *dev, struct device_driver *drv)
>> +{
>> +	struct slim_device *sbdev = to_slim_device(dev);
>> +	struct slim_driver *sbdrv = to_slim_driver(drv);
>> +
>> +	return slim_match(sbdrv->id_table, sbdev) != NULL;
> 
> return !!slim_match() ?
> 
>> +static int slim_device_probe(struct device *dev)
>> +{
>> +	struct slim_device	*sbdev;
>> +	struct slim_driver	*sbdrv;
>> +	int ret = 0;
>> +
>> +	sbdev = to_slim_device(dev);
>> +	sbdrv = to_slim_driver(dev->driver);
>> +
>> +	if (sbdrv->probe)
>> +		ret = sbdrv->probe(sbdev);
> 
> shouldn't probe be mandatory :)
Yep it is .. I will fix that..
> 
>> diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
>> index 1c2e8d6b7274..7d6238863fc1 100644
>> --- a/include/linux/mod_devicetable.h
>> +++ b/include/linux/mod_devicetable.h
>> @@ -452,6 +452,19 @@ struct spi_device_id {
>>   	kernel_ulong_t driver_data;	/* Data private to the driver */
>>   };
>>   
>> +/* SLIMbus */
>> +
>> +#define SLIMBUS_NAME_SIZE	32
>> +#define SLIMBUS_MODULE_PREFIX	"slim:"
>> +
>> +struct slim_device_id {
>> +	__u16 manf_id, prod_code;
>> +	__u8 dev_index, instance;
>> +
>> +	/* Data private to the driver */
>> +	kernel_ulong_t driver_data;
> 
> As Takashi pointed out in SDW patches, this needs to be aligned.
> 
Okay, I will make sure that driver_data is aligned.

>> +};
>> +
> 
> I was hoping to see changes to devicetable-offsets.c and file2alias.c as
> well as that is required for module autoloading. I think that is required?
> 
>> +/**
>> + * struct slim_device - Slim device handle.
>> + * @dev: Driver model representation of the device.
>> + * @name: Name of driver to use with this device.
>> + * @e_addr: Enumeration address of this device.
>> + * @driver: Device's driver. Pointer to access routines.
>> + * @laddr: 1-byte Logical address of this device.
>> + *
>> + * This is the client/device handle returned when a slimbus
>> + * device is registered with a controller.
>> + * Pointer to this structure is used by client-driver as a handle.
>> + */
>> +struct slim_device {
>> +	struct device		dev;
>> +	struct slim_eaddr	e_addr;
>> +	struct list_head node;
> 
> aligned with others please
> 
Thanks for spotting, this looks like a leftover, There is no use of node 
in this structure so I will remove it in next version.

>> +/**
>> + * struct slim_driver - Slimbus 'generic device' (slave) device driver
>> + *				(similar to 'spi_device' on SPI)
>> + * @probe: Binds this driver to a slimbus device.
>> + * @remove: Unbinds this driver from the slimbus device.
>> + * @shutdown: Standard shutdown callback used during powerdown/halt.
>> + * @device_status: This callback is called when
>> + *	-The device reports present and gets a laddr assigned
>> + *	-The device reports absent, or the bus goes down.
> 
> space after - pls
Yep.. will do that.
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ