On Sun, Oct 21, 2018 at 12:20:47PM +0200, Thomas Gleixner wrote: > Andi, > > On Sat, 20 Oct 2018, Andi Kleen wrote: > > On Sat, Oct 20, 2018 at 10:19:37AM +0200, Thomas Gleixner wrote: > > > On Fri, 19 Oct 2018, Andi Kleen wrote: > > > There is no point to return the pointer because it's not a compound > > > structure. If you want to provide the possibility to use the index then > > > return the index and an error code if it does not match. > > > > It will be useful with the driver_data pointer, which you short sightedly > > forced me to remove, and likely will need to be readded at some point > > anyways if this gets more widely used. > > It's good and established practice not to add functionality on a 'might be > used' basis. If you'd provide at least one or two patches which demonstrate > how that is useful then that would be convincing. > > > At least with the pointer not all callers will need to be changed then. > > It doesn't need to be changed at all, when done correctly.
Thanks. I opted for the simpler method of returning a boolean now. -Andi