On Tue, Apr 16, 2019 at 12:31 PM Suzuki K Poulose <suzuki.poul...@arm.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.poul...@arm.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 <gre...@linuxfoundation.org> > >> Cc: "Rafael J. Wysocki" <raf...@kernel.org> > >> Signed-off-by: Suzuki K Poulose <suzuki.poul...@arm.com> > > > > Can you resend this with a CC to linux-a...@vger.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.