From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754176AbcIILGR (ORCPT ); Fri, 9 Sep 2016 07:06:17 -0400 Received: from foss.arm.com ([217.140.101.70]:38764 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754020AbcIILGP (ORCPT ); Fri, 9 Sep 2016 07:06:15 -0400 Date: Fri, 9 Sep 2016 12:05:58 +0100 From: Mark Rutland To: Will Deacon Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, acme@kernel.org, alexander.shishkin@linux.intel.com, jolsa@kernel.org, mingo@redhat.com, peterz@infradead.org Subject: Re: [RFCv4 1/7] drivers/perf: arm_pmu: add common attr group fields Message-ID: <20160909110558.GC10562@leverpostej> References: <1473330112-28528-1-git-send-email-mark.rutland@arm.com> <1473330112-28528-2-git-send-email-mark.rutland@arm.com> <20160909102554.GF20192@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160909102554.GF20192@arm.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.