Re[2]: [PATCH] clocksource: Add pointer to clocksource structure in read function

Alexander Shiyan shc_work at mail.ru
Mon Apr 22 10:19:19 EDT 2013


> On 13:13 Mon 22 Apr     , Alexander Shiyan wrote:
> > > On 10:35 Sat 20 Apr     , Alexander Shiyan wrote:
> > > > 
> > > > This patch adds pointer to clocksource structure in read function.
> > > > For avoid name collisions, clocksource names for all drivers was
> > > > changed to be unique.
> > > why?
> > > 
> > > no need the clocksource is hot path don't touch it
> > > and we do not need the struct pointer as we can have only 1 cs in barebox
> > 
> > This change allows to add an additional field in struct clocksource then
> > we can remove static variables from clocksource drivers.
> why we have only one clocksource at a time
> what you propose will require to use container_of
> 
> so will slow down a lot barebox

I hope to see any comments about this patch from Sascha.
Of course, we have only one instance of clocksource, but generally
direction of this patch is avoid of usage static variables in clocksource drivers.
With path we can remove all usage. Is this not good for you?

---


More information about the barebox mailing list