From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753146AbeANUrv (ORCPT + 1 other); Sun, 14 Jan 2018 15:47:51 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:38450 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752582AbeANUrt (ORCPT ); Sun, 14 Jan 2018 15:47:49 -0500 Date: Sun, 14 Jan 2018 21:47:42 +0100 (CET) From: Thomas Gleixner To: Kan Liang cc: peterz@infradead.org, mingo@redhat.com, linux-kernel@vger.kernel.org, acme@kernel.org, eranian@google.com, ak@linux.intel.com Subject: Re: [PATCH V4 3/8] perf/x86/intel/uncore: correct fixed counter index check in generic code In-Reply-To: <1509654593-4446-3-git-send-email-kan.liang@intel.com> Message-ID: References: <1509654593-4446-1-git-send-email-kan.liang@intel.com> <1509654593-4446-3-git-send-email-kan.liang@intel.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Thu, 2 Nov 2017, kan.liang@intel.com wrote: > From: Kan Liang > > There is no index which is bigger than UNCORE_PMC_IDX_FIXED. The only > exception is client IMC uncore. It has customized function to deal with > the 'UNCORE_PMC_IDX_FIXED + 1' case. It does not touch the generic code. > For generic code, it is not correct to use >= to check fixed counter. > The code quality issue will bring problem when new counter index is > introduced. > > Signed-off-by: Kan Liang Reviewed-by: Thomas Gleixner