From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755376AbcAOToj (ORCPT ); Fri, 15 Jan 2016 14:44:39 -0500 Received: from e37.co.us.ibm.com ([32.97.110.158]:37212 "EHLO e37.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754764AbcAOToi (ORCPT ); Fri, 15 Jan 2016 14:44:38 -0500 X-IBM-Helo: d03dlp03.boulder.ibm.com X-IBM-MailFrom: sukadev@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org Date: Fri, 15 Jan 2016 11:44:00 -0800 From: Sukadev Bhattiprolu To: Madhavan Srinivasan Cc: Michael Ellerman , Arnaldo Carvalho de Melo , Jiri Olsa , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] powerpc/perf: Export Power8 generic and cache events to sysfs Message-ID: <20160115194400.GA16425@us.ibm.com> References: <1452552926-17494-1-git-send-email-sukadev@linux.vnet.ibm.com> <1452552926-17494-2-git-send-email-sukadev@linux.vnet.ibm.com> <56978D36.5040005@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56978D36.5040005@linux.vnet.ibm.com> X-Operating-System: Linux 2.0.32 on an i486 User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16011519-0025-0000-0000-000020711560 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Madhavan Srinivasan [maddy@linux.vnet.ibm.com] wrote: > > +enum { > > +#include "power8-events-list.h" > > +}; > > > > IIUC we dont use this enum as a index to > some array, so can we do something like this? Possibly, but its already a macro soup and we would add another layer of indirection? I agree though that the #define and #undefs are not intuitive. Since it is only a few entries for Power8, was keeping it consistent with Power7. Sukadev