On Wed, Oct 14, 2020 at 12:03:45PM -0700, Florian Fainelli wrote: > On 10/14/20 8:05 AM, Cristian Marussi wrote: > > Extend common protocol registration routines and provide some new generic > > protocols' init/deinit helpers that tracks protocols' users and > > automatically > > perform the proper initialization/de-initialization on demand. > > > > Convert all protocols to use new registration schema while modifying only > > Base > > protocol to use also the new initialization helpers. > > > > All other standard protocols' initialization is still umodified and bound to > > SCMI devices probing. > > > > Signed-off-by: Cristian Marussi <[email protected]> > > --- >
[...] > > > + struct scmi_protocol_instance *protocols[SCMI_MAX_PROTO]; > > Humm that would be 2048 bytes on a 64-bit platform and 1024 bytes on a > 32-bit platform, this is not so bad, but it is a bit wasteful given that > 6-7 standard protocols are typically found, and most often no > proprietary protocols are registered. Not necessarily to be addressed > right now. > Thanks for looking at these patches so quickly, much appreciated. I haven't looked at this series in detail yet. But this is something that caught my attention too when I glanced at these patches. I mentioned the same to Cristian. Indeed we can address that separately, we have even this for notification, we need to see if we can put all such info in a container structure and then use hashtable or idr. -- Regards, Sudeep

