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] [day] [month] [year] [list]
Message-ID: <c49c64f2-3d67-48ca-bb17-becd0d1cc515@cherry.de>
Date: Fri, 6 Sep 2024 11:32:59 +0200
From: Farouk Bouabid <farouk.bouabid@...rry.de>
To: Andi Shyti <andi.shyti@...nel.org>, Peter Rosin <peda@...ntia.se>
Cc: Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
 Conor Dooley <conor+dt@...nel.org>, Quentin Schulz
 <quentin.schulz@...rry.de>, Jean Delvare <jdelvare@...e.com>,
 Guenter Roeck <linux@...ck-us.net>, Heiko Stuebner <heiko@...ech.de>,
 linux-i2c@...r.kernel.org, devicetree@...r.kernel.org,
 linux-kernel@...r.kernel.org, linux-hwmon@...r.kernel.org,
 linux-arm-kernel@...ts.infradead.org, linux-rockchip@...ts.infradead.org,
 Wolfram Sang <wsa+renesas@...g-engineering.com>
Subject: Re: [PATCH v7 2/8] i2c: muxes: add support for tsd,mule-i2c
 multiplexer

Hi Andi,

On 05.09.24 22:20, Andi Shyti wrote:
> Hi,
>
> On Wed, Sep 04, 2024 at 10:59:47AM GMT, Peter Rosin wrote:
>> 2024-09-04 at 10:35, Farouk Bouabid wrote:
>>> On 03.09.24 17:13, Andi Shyti wrote:
>>>
>>> [...]
>>>
>>>>> +        ret = i2c_mux_add_adapter(muxc, 0, reg);
>>>>> +        if (ret)
>>>>> +            return ret;
>>>> do we need to delete the adapters we added in previous cycles?
>>>>
>>> We calldevm_action_or_reset() before the loop to add adapter-removal to the error path. I think that does the job
>>>
>>> for us or am I missing something ?
>> I missed that too, but it LGTM. It's safe to call i2c_mux_del_adapters() as
>> soon the mux core has been allocated, so there is no risk it is called too
>> early or something.
> Just a question, still: is it the same calling
> i2c_mux_add_adapter() and calling mux_remove()?
>

We are basically wrapping i2c_mux_adapters_del() by mux_remove() 
(implemented in our driver) which is registered it as 
devm_add_action_or_reset and would be called for a non-0 return of the 
probe.  i2c_mux_adapters_del() will then remove added adapters (do 
nothing if none is added).


Thanks,

Farouk


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ