lkml.org 
[lkml]   [2016]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFCv4 1/7] drivers/perf: arm_pmu: add common attr group fields
On Fri, Sep 09, 2016 at 11:25:54AM +0100, Will Deacon wrote:
> On Thu, Sep 08, 2016 at 11:21:46AM +0100, Mark Rutland wrote:
> > +enum armpmu_attr_groups {
> > + ARMPMU_ATTR_GROUP_EVENTS,
> > + ARMPMU_ATTR_GROUP_FORMATS,
> > + ARMPMU_NR_ATTR_GROUPS
> > +};
> > +
> > struct arm_pmu {
> > struct pmu pmu;
> > cpumask_t active_irqs;
> > @@ -111,6 +117,7 @@ struct arm_pmu {
> > struct pmu_hw_events __percpu *hw_events;
> > struct list_head entry;
> > struct notifier_block cpu_pm_nb;
> > + const struct attribute_group *attr_groups[ARMPMU_NR_ATTR_GROUPS + 1];
>
> Is the '+ 1' because the array has to be NULL terminated?

Yes.

> Probably worth a comment to disuade people from sending "obvious"
> fixes.

Sure. I had meant to do this already, but forgot. :/

Thanks,
Mark.

\
 
 \ /
  Last update: 2016-09-17 09:59    [W:0.058 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site