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: <56A71CE5.4080201@openwrt.org>
Date:	Tue, 26 Jan 2016 08:14:45 +0100
From:	John Crispin <blogic@...nwrt.org>
To:	Henry Chen <henryc.chen@...iatek.com>
Cc:	Steven Liu <steven.liu@...iatek.com>,
	Sascha Hauer <s.hauer@...gutronix.de>,
	linux-kernel@...r.kernel.org, Flora Fu <flora.fu@...iatek.com>,
	linux-mediatek@...ts.infradead.org,
	Matthias Brugger <matthias.bgg@...il.com>,
	Lee Jones <lee.jones@...aro.org>,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH V2 4/4] mfd: mediatek: add MT6323 support to MT6397 driver



On 26/01/2016 04:07, Henry Chen wrote:
> On Mon, 2016-01-25 at 19:59 +0100, John Crispin wrote:
>>
>> On 25/01/2016 19:44, Matthias Brugger wrote:
>>> On Monday 25 Jan 2016 16:36:40 John Crispin wrote:
>>>> Hi,
>>>>
>>>> On 25/01/2016 13:41, Lee Jones wrote:
>>>>> Please honour the subject format of the subsystem you are contributing
>>>>> to.
>>>>>
>>>>> `git log --oneline -- $subsystem` gives you this.
>>>>>
>>>>> On Mon, 25 Jan 2016, John Crispin wrote:
>>>>>> Signed-off-by: John Crispin <blogic@...nwrt.org>
>>>>>> ---
>>>>
>>>> [...]
>>>>
>>>>>> @@ -261,6 +271,15 @@ static int mt6397_probe(struct platform_device
>>>>>> *pdev)
>>>>>>
>>>>>>  	}
>>>>>>  	
>>>>>>  	switch (id & 0xff) {
>>>>>>
>>>>>> +	case MT6323_CID_CODE:
>>>>>> +		mt6397->int_con[0] = MT6323_INT_CON0;
>>>>>
>>>>> This is confusing.  You're still using memory allocated for a mt6397
>>>>> device.
>>>>
>>>> the variable is currently defined as struct mt6397_chip *mt6397;
>>>> shall i only change the name or also create a patch to rename the struct ?
>>>>
>>>
>>> I think we should rename the struct and the file as well.
>>>
>>> Cheers,
>>> Matthias
>>
>> Hi,
>>
>> that would have been my next question. renaming the struct would imply
>> renaming the driver and the whole namespace contained within. We would
>> then also need to change the Kconfig and Makefile. I am happy to do this
>> but want to be sure that is is actually wanted.
>>
>> 	John
> Hi,
> 
> Since mt6323 was similar with mt6397, I think we can reuse the
> mt6397_chip without duplicate code.
> 
> Maybe we can rename the local variable name to avoid confusing.
> 
> struct mt6397_chip *mt_pmic;
> ...
> ...
> switch (id & 0xff) {
> 	case MT6323_CID_CODE:
> 		mt_pmic->int_con[0] = MT6323_INT_CON0;
> 		mt_pmic->int_con[1] = MT6323_INT_CON1;
> ...
> ...
> 
> Henry

Hi,

IMHO we should either rename the namespace or not. renaming some
variables seems weird as that will just move the confusion/inconsistency
to another place in the code. I am however rather indifferent on this
matter.

	John

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ