From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756101AbaE2UvJ (ORCPT ); Thu, 29 May 2014 16:51:09 -0400 Received: from mail-we0-f178.google.com ([74.125.82.178]:47777 "EHLO mail-we0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754261AbaE2UvH (ORCPT ); Thu, 29 May 2014 16:51:07 -0400 From: Giedrius Rekasius To: Peter Zijlstra Cc: Paul Mackerras , Ingo Molnar , Arnaldo Carvalho de Melo , Thomas Gleixner , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] perf/x86/uncore: Remove unnecessary assignment to "box" in uncore_pci_remove(...) Date: Thu, 29 May 2014 21:51:03 +0100 Message-Id: <1401396663-23829-1-git-send-email-giedrius.rekasius@gmail.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Local variable "box" gets assigned correct value when it is initialized. There is no need to assign the same value again. Variable declarations were reshuffled for better readability. Signed-off-by: Giedrius Rekasius --- Original patch was amended for better readability based on feedback from Walter Harms and Thomas Gleixner. arch/x86/kernel/cpu/perf_event_intel_uncore.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c index 65bbbea..6fe20db 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c @@ -3813,11 +3813,10 @@ static int uncore_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id static void uncore_pci_remove(struct pci_dev *pdev) { + int i, cpu, phys_id = pcibus_to_physid[pdev->bus->number]; struct intel_uncore_box *box = pci_get_drvdata(pdev); struct intel_uncore_pmu *pmu; - int i, cpu, phys_id = pcibus_to_physid[pdev->bus->number]; - box = pci_get_drvdata(pdev); if (!box) { for (i = 0; i < UNCORE_EXTRA_PCI_DEV_MAX; i++) { if (extra_pci_dev[phys_id][i] == pdev) { -- 1.9.3