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: <6d513e04-3a57-1989-429c-64631101c5a2@synopsys.com>
Date:   Fri, 23 Nov 2018 12:39:31 +0000
From:   vitor <vitor.soares@...opsys.com>
To:     Boris Brezillon <boris.brezillon@...tlin.com>,
        Vitor Soares <vitor.soares@...opsys.com>
CC:     <wsa@...-dreams.de>, <linux-i2c@...r.kernel.org>, <corbet@....net>,
        <linux-doc@...r.kernel.org>, <gregkh@...uxfoundation.org>,
        <arnd@...db.de>, <psroka@...ence.com>, <agolec@...ence.com>,
        <adouglas@...ence.com>, <bfolta@...ence.com>, <dkos@...ence.com>,
        <alicja@...ence.com>, <cwronka@...ence.com>, <sureshp@...ence.com>,
        <rafalc@...ence.com>, <thomas.petazzoni@...tlin.com>, <nm@...com>,
        <robh+dt@...nel.org>, <pawel.moll@....com>, <mark.rutland@....com>,
        <ijc+devicetree@...lion.org.uk>, <galak@...eaurora.org>,
        <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <geert@...ux-m68k.org>, <linus.walleij@...aro.org>,
        <Xiang.Lin@...aptics.com>, <linux-gpio@...r.kernel.org>,
        <nsekhar@...com>, <pgaj@...ence.com>, <peda@...ntia.se>,
        <mshettel@...eaurora.org>, <swboyd@...omium.org>,
        <joao.pinto@...opsys.com>
Subject: Re: [PATCH] i3c: master: dw: split dw-i3c-master.c into master and
 bus specific parts

Hi Boris,


On 22/11/18 20:02, Boris Brezillon wrote:
> On Thu, 22 Nov 2018 17:54:54 +0000
> Vitor Soares <vitor.soares@...opsys.com> wrote:
>
>> From: Vitor Soares <soares@...opsys.com>
>>
>> This patch slipts dw-i3c-master.c into three pieces:
>> 	dw-i3c-master.c - contains the code that interacts directly with the
>> 	core in master mode.
>>
>> 	dw-i3c-platdrv.c - contains the code specific to the platform driver.
>>
>> 	dw-i3c-core.h - contains the definitions and declarations shared by
>> 	dw-i3c-master and dw-i3c-platdrv
>>
>> This patch will allow SOC integrators to add their code specific to
>> DesignWare I3C IP.
> Isn't it too early to do this change? Can't we wait until we have a SoC
> that actually embeds this IP?


I'm trying to turn it more flexible so the other can reuse the code.


>
>> Signed-off-by: Vitor Soares <soares@...opsys.com>
>> ---
>>   drivers/i3c/master/Kconfig          |   9 +-
>>   drivers/i3c/master/Makefile         |   5 +-
>>   drivers/i3c/master/dw-i3c-core.h    | 214 ++++++++++++++++++++++++++
>>   drivers/i3c/master/dw-i3c-master.c  | 299 ++----------------------------------
>>   drivers/i3c/master/dw-i3c-platdrv.c | 112 ++++++++++++++
> I'd prefer to have a dw/ subdir where you'd place all dw files.


Sure. I will change to this:

../dwc
    |-core.h
    |-master.c
    |-platdrv.c


so the user doesn't need to write dw-i3c.. several times. The folder 
name is the same as for other subsystem (e.g. PCI).

What do you think?

>
>>   5 files changed, 349 insertions(+), 290 deletions(-)
>>   create mode 100644 drivers/i3c/master/dw-i3c-core.h
>>   create mode 100644 drivers/i3c/master/dw-i3c-platdrv.c
>>
>> diff --git a/drivers/i3c/master/Kconfig b/drivers/i3c/master/Kconfig
>> index 8ee1ce6..fdc6e46 100644
>> --- a/drivers/i3c/master/Kconfig
>> +++ b/drivers/i3c/master/Kconfig
>> @@ -5,9 +5,14 @@ config CDNS_I3C_MASTER
>>   	help
>>   	  Enable this driver if you want to support Cadence I3C master block.
>>   
>> -config DW_I3C_MASTER
>> -	tristate "Synospsys DesignWare I3C master driver"
>> +config DW_I3C_CORE
>> +	tristate
>> +
>> +config DW_I3C_PLATFORM
>> +	tristate "Synospsys DesignWare I3C Platform driver"
>> +	select DW_I3C_CORE
>>   	depends on I3C
>> +	depends on HAS_IOMEM
>>   	depends on !(ALPHA || PARISC)
>>   	# ALPHA and PARISC needs {read,write}sl()
>>   	help
>> diff --git a/drivers/i3c/master/Makefile b/drivers/i3c/master/Makefile
>> index fc53939..004ad1c 100644
>> --- a/drivers/i3c/master/Makefile
>> +++ b/drivers/i3c/master/Makefile
>> @@ -1,2 +1,5 @@
>>   obj-$(CONFIG_CDNS_I3C_MASTER)		+= i3c-master-cdns.o
>> -obj-$(CONFIG_DW_I3C_MASTER)		+= dw-i3c-master.o
>> +obj-$(CONFIG_DW_I3C_CORE)		+= dw-i3c-core.o
>> +dw-i3c-core-objs			:= dw-i3c-master.o
>> +obj-$(CONFIG_DW_I3C_PLATFORM)		+= dw-i3c-platform.o
>> +dw-i3c-platform-objs			:= dw-i3c-platdrv.o
> Do we really have to create one module for the core and one per SoC?
> Can't we have everything in the same .ko?


This will help the introduction of new modules. The design in my mind is 
to have:

-core.h

-common.c

-master.c

-slave.c

...

I'm not sure if make sense to change core.h to common.h.



Thaks for your feedback.


Best regards,

Vitor Soares

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ