From patchwork Wed Aug 10 12:58:58 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 1053622 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7AD1LLY002936 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 10 Aug 2011 13:01:41 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Qr8PC-0006le-Ki; Wed, 10 Aug 2011 13:01:07 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Qr8PC-0002si-45; Wed, 10 Aug 2011 13:01:06 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Qr8Ou-0002pP-A1 for linux-arm-kernel@canuck.infradead.org; Wed, 10 Aug 2011 13:00:48 +0000 Received: from service87.mimecast.com ([94.185.240.25]) by casper.infradead.org with smtp (Exim 4.76 #1 (Red Hat Linux)) id 1Qr8Os-0007hx-3T for linux-arm-kernel@lists.infradead.org; Wed, 10 Aug 2011 13:00:46 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Wed, 10 Aug 2011 13:59:29 +0100 Received: from localhost.localdomain ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 10 Aug 2011 13:59:27 +0100 From: Mark Rutland To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/2] ARM: perf: make name of arm_pmu_type consistent Date: Wed, 10 Aug 2011 13:58:58 +0100 Message-Id: <1312981138-17020-2-git-send-email-mark.rutland@arm.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1312981138-17020-1-git-send-email-mark.rutland@arm.com> References: <1312981138-17020-1-git-send-email-mark.rutland@arm.com> X-OriginalArrivalTime: 10 Aug 2011 12:59:27.0303 (UTC) FILETIME=[55FB9D70:01CC575D] X-MC-Unique: 111081013592908501 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110810_140046_220662_9B6C69CA X-CRM114-Status: GOOD ( 10.99 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on casper.infradead.org summary: Content analysis details: (-2.6 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [94.185.240.25 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Mark Rutland , Will Deacon X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Wed, 10 Aug 2011 13:01:41 +0000 (UTC) Commit f12482c9 ("ARM: 6974/1: pmu: refactor reservation") changed {release,reserve}_pmu to take an enum arm_pmu_type as a parameter, but inconsistently named the parameter `type' or `device'. It would be nice if these were consistent. This patch makes use of enum arm_pmu_type consistent, always using 'device' as this is more common in usage. Signed-off-by: Mark Rutland Cc: Will Deacon --- arch/arm/include/asm/pmu.h | 2 +- arch/arm/kernel/pmu.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/arm/include/asm/pmu.h b/arch/arm/include/asm/pmu.h index 8ae32ba..456117c 100644 --- a/arch/arm/include/asm/pmu.h +++ b/arch/arm/include/asm/pmu.h @@ -52,7 +52,7 @@ reserve_pmu(enum arm_pmu_type device); * a cookie. */ extern int -release_pmu(enum arm_pmu_type type); +release_pmu(enum arm_pmu_type device); /** * init_pmu() - Initialise the PMU. diff --git a/arch/arm/kernel/pmu.c b/arch/arm/kernel/pmu.c index 2b70709..89cbdc5 100644 --- a/arch/arm/kernel/pmu.c +++ b/arch/arm/kernel/pmu.c @@ -27,22 +27,22 @@ static volatile long pmu_lock; static struct platform_device *pmu_devices[ARM_NUM_PMU_DEVICES]; static int __devinit pmu_register(struct platform_device *pdev, - enum arm_pmu_type type) + enum arm_pmu_type device) { - if (type < 0 || type >= ARM_NUM_PMU_DEVICES) { + if (device < 0 || device >= ARM_NUM_PMU_DEVICES) { pr_warning("received registration request for unknown " - "device %d\n", type); + "device %d\n", device); return -EINVAL; } - if (pmu_devices[type]) { + if (pmu_devices[device]) { pr_warning("rejecting duplicate registration of PMU device " - "type %d.", type); + "type %d.", device); return -ENOSPC; } - pr_info("registered new PMU device of type %d\n", type); - pmu_devices[type] = pdev; + pr_info("registered new PMU device of type %d\n", device); + pmu_devices[device] = pdev; return 0; }