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: <CAJZ5v0jrBi3oWAVsgk5hMPAudWEBshkqM8Epg0a-7zbnAMOvDg@mail.gmail.com>
Date:   Tue, 16 Apr 2019 12:45:23 +0200
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Suzuki K Poulose <suzuki.poulose@....com>
Cc:     "Rafael J. Wysocki" <rafael@...nel.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        coresight@...ts.linaro.org,
        Mathieu Poirier <mathieu.poirier@...aro.org>,
        mike.leach@...aro.org, "Rafael J. Wysocki" <rjw@...ysocki.net>,
        robert.walker@....com,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH v2 27/36] drivers: Add a generic helper to match device by
 fwnode handle

On Tue, Apr 16, 2019 at 12:31 PM Suzuki K Poulose
<suzuki.poulose@....com> wrote:
>
> Hi Rafael
>
> On 04/16/2019 11:20 AM, Rafael J. Wysocki wrote:
> > On Mon, Apr 15, 2019 at 6:06 PM Suzuki K Poulose <suzuki.poulose@....com> wrote:
> >>
> >> Make the device_fwnode_match() a generic helper to match device
> >> by fwnode handle for use with bus_find_device(). This will be
> >> also used by coresight.
> >>
> >> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> >> Cc: "Rafael J. Wysocki" <rafael@...nel.org>
> >> Signed-off-by: Suzuki K Poulose <suzuki.poulose@....com>
> >
> > Can you resend this with a CC to linux-acpi@...r.kernel.org, please?
> >
> > There's some device properties material for 5.2 collected already and
> > it would be good to keep all that together.
> >
>
> Sure, will do. Btw, I have a question w.r.t the match function.
>
> We have :
>
>
> class_find_device(struct class *class, struct device *start,
>                    const void *data,
>                    int (*match)(struct device *, const void *))
> and
>
> bus_find_device(struct bus_type *bus,
>                  struct device *start, void *data,
>                  int (*match)(struct device *dev, void *data))
>
> Just because the "match" has slightly different constraint for the
> data (i.e, const void * vs void *), we can't reuse the same match
> function for class_find_device. Do you think we should converge the
> types to reuse the same match every where (Of course in a separate
> patch series) ?

AFAICS, (void *) pointers can be passed to functions taking (const
void *) arguments, so yes, it looks like that could be consolidated
and it also would be a valuable cleanup IMO.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ