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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <5705F131.4090201@samsung.com>
Date:	Thu, 07 Apr 2016 07:33:37 +0200
From:	Marek Szyprowski <m.szyprowski@...sung.com>
To:	Alison Schofield <amsfield22@...il.com>
Cc:	jic23@...nel.org, knaack.h@....de, lars@...afoo.de,
	pmeerw@...erw.net, kgene@...nel.org, k.kozlowski@...sung.com,
	linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	linux-samsung-soc@...r.kernel.org
Subject: Re: [PATCH 1/9] iio: adc: exynos_adc: use regmap to retrieve struct
 device

Hello,

On 2016-04-06 22:33, Alison Schofield wrote:
> On Wed, Apr 06, 2016 at 09:03:00AM +0200, Marek Szyprowski wrote:
>> Hello,
>>
>> On 2016-04-06 07:15, Alison Schofield wrote:
>>> Driver includes struct regmap and struct device in its global data.
>>> Remove the struct device and use regmap API to retrieve device info.
>>>
>>> Patch created using Coccinelle plus manual edits.
>>>
>>> Signed-off-by: Alison Schofield <amsfield22@...il.com>
>> This patch changes the struct device which is used by the driver to report
>> errors. The driver used correctly the struct device associated with its
>> device tree node, while after the patch it will use device which is
>> associated with PMU regmap, which is a different device. PMU regmap is there
>> only to enable/disable the ADC block and it is not the regmap used to access
>> registers of the ADC device.
>>
>> I would prefer to drop this patch.
> Thanks Marek!  Please check my understanding.  Driver is not carrying
> a duplicate struct device. The regmap in exynos_adc is *not* this
> devices regmap. It belongs to the PMU, (power mgmt unit?)

Exactly.

> It seemed excessive to carry around a struct device just for the
> dev_err messages, but, we need that struct to extract the correct
> iio_dev struct. Without a regmap belonging to this actual device,
> no efficiencies can be gained in exynos, and the patch will be
> dropped from set v2.

Thanks.

> Now I need to be able to recognize such cases elsewhere. I'm going
> back though other patches in this set looking for that, but I'm not
> so sure I would recognize it.
>
> Jonathan & all, Any hints on the rule of regmap?

You may check how the regmap is initialized. When it is retrieved by
phandle from device tree, then you might be almost sure that it refers
to the different device.

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ