[RFCv4 1/7] drivers/perf: arm_pmu: add common attr group fields

Mark Rutland mark.rutland at arm.com
Fri Sep 9 04:05:58 PDT 2016


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.



More information about the linux-arm-kernel mailing list