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: <YrX3mWxDex7OuEpn@mail.local>
Date:   Fri, 24 Jun 2022 19:42:49 +0200
From:   Alexandre Belloni <alexandre.belloni@...tlin.com>
To:     Stephen Kitt <steve@....org>
Cc:     Alessandro Zummo <a.zummo@...ertech.it>,
        Dianlong Li <long17.cool@....com>,
        Wolfram Sang <wsa@...nel.org>, linux-rtc@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rtc: use simple i2c probe

On 12/06/2022 21:23:47+0200, Stephen Kitt wrote:
> Hi Alexandre,
> 
> Le 11/06/2022 16:48, Alexandre Belloni a écrit :
> > On 10/06/2022 18:23:43+0200, Stephen Kitt wrote:
> > > All these drivers have an i2c probe function which doesn't use the
> > > "struct i2c_device_id *id" parameter, so they can trivially be
> > > converted to the "probe_new" style of probe with a single argument.
> > > 
> > 
> > I think you should explain why you want to do that as the trend is to do
> > the exact opposite to allow support for those RTCS on x86 systems.
> 
> Indeed, I should have given more context. The idea is to continue the
> transition started with https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b8a1a4cd5a98a2adf8dfd6902cd98e57d910ee12
> (in 2016...). I²C drivers using probe() involve a call to i2c_match_id: in
> drivers/i2c/i2c-core-base.c,
> 
>         /*
>          * When there are no more users of probe(),
>          * rename probe_new to probe.
>          */
>         if (driver->probe_new)
>                 status = driver->probe_new(client);
>         else if (driver->probe)
>                 status = driver->probe(client,
>                                        i2c_match_id(driver->id_table,
> client));
>         else
>                 status = -EINVAL;
> 
> Many drivers don't actually need the second parameter, so instead of having
> probe() with both parameters, the goal is to switch to a probe function with
> only "struct i2c_client *". Probe functions that *do* need the "struct
> i2c_device_id" can call i2c_match_id themselves (as is done currently with
> of_match_id).
> 
> I discussed this briefly with Wolfram beginning of June at Kernel Recipes,
> and as I understood it the plan was still to continue with this transition
> (in fact, the plan was for *me* to continue with this transition).
> 
> Do you have an example of a change requiring id to support RTCs on x86
> systems?

I checked and your patch is actually fine, the issue I referred to is:

1c1b3098ae1e ("rtc: pcf85063: add i2c_device_id name matching support")


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ