From patchwork Mon May 11 04:17:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 48197 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CF4D721550 for ; Mon, 11 May 2015 04:18:43 +0000 (UTC) Received: by wizk4 with SMTP id k4sf22345164wiz.2 for ; Sun, 10 May 2015 21:18:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=F0jMN8zsyPWFCYxYEgLMuAJhU9Q8tOH51Av+eqSNu/U=; b=WWHH2iOnD9H6UWN2ooD1WYhAxXY8R9TzsC7KAyxEOPs5cLyo7BPAlWvWprl3zUtzXQ ZY43X/kagWrc6vVGsTEoSP3mmE5IRqyD/gWgm00hqXQfLfBM2sVpgThx06+BAjb+NLiB ersOA54FrwLVV/sJzmuJIVC+2FOFwH0WlwTBq1hDWQiifjPosZmVikxOHEzT9mTLW1hb kvCOSHr0AuKKiTtW+0buWXQHjsoHWqqRkRa6cgxDv6jb5x1Qg/lD70TR5uUCxIc5u2ei BXSaTCEIjEJzocuXlI1kdpSSlWdgLFr21QV509diAuyqCDWy65o+2W1L08uClDeb8f4v IAZQ== X-Gm-Message-State: ALoCoQl9xjJwTBbaQmSKA2M6LKPzRUszK+mfFg96vHuI11RTfC3NtOzAionSu0sMLhY0AqzFMk/q X-Received: by 10.112.203.168 with SMTP id kr8mr6286281lbc.10.1431317923054; Sun, 10 May 2015 21:18:43 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.30.37 with SMTP id p5ls592491lah.9.gmail; Sun, 10 May 2015 21:18:42 -0700 (PDT) X-Received: by 10.153.4.43 with SMTP id cb11mr6774728lad.122.1431317922882; Sun, 10 May 2015 21:18:42 -0700 (PDT) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id o3si7660439laf.40.2015.05.10.21.18.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 May 2015 21:18:42 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by layy10 with SMTP id y10so84967501lay.0 for ; Sun, 10 May 2015 21:18:42 -0700 (PDT) X-Received: by 10.113.10.134 with SMTP id ea6mr6550615lbd.29.1431317922776; Sun, 10 May 2015 21:18:42 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp1290358lbb; Sun, 10 May 2015 21:18:41 -0700 (PDT) X-Received: by 10.66.159.68 with SMTP id xa4mr16170739pab.105.1431317921042; Sun, 10 May 2015 21:18:41 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gz2si11966525pbb.155.2015.05.10.21.18.40; Sun, 10 May 2015 21:18:41 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752499AbbEKESc (ORCPT + 28 others); Mon, 11 May 2015 00:18:32 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:32875 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752376AbbEKESZ (ORCPT ); Mon, 11 May 2015 00:18:25 -0400 Received: by pacwv17 with SMTP id wv17so99870294pac.0 for ; Sun, 10 May 2015 21:18:25 -0700 (PDT) X-Received: by 10.66.222.103 with SMTP id ql7mr15848450pac.144.1431317905448; Sun, 10 May 2015 21:18:25 -0700 (PDT) Received: from localhost ([180.150.153.56]) by mx.google.com with ESMTPSA id dp4sm9183658pbb.82.2015.05.10.21.18.23 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 10 May 2015 21:18:24 -0700 (PDT) From: Hanjun Guo To: "Rafael J. Wysocki" , linux-acpi@vger.kernel.org Cc: Will Deacon , Catalin Marinas , Boris Ostrovsky , Stefano Stabellini , Lorenzo Pieralisi , Sudeep Holla , Konrad Rzeszutek Wilk , linux-kernel@vger.kernel.org, linaro-acpi@lists.linaro.org, Hanjun Guo Subject: [PATCH v3 5/7] ACPI / processor: remove phys_id in acpi_processor_get_info() Date: Mon, 11 May 2015 12:17:17 +0800 Message-Id: <1431317839-4584-6-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1431317839-4584-1-git-send-email-hanjun.guo@linaro.org> References: <1431317839-4584-1-git-send-email-hanjun.guo@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: hanjun.guo@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Use pr->phys_id to replace phys_id to simplify the code. Signed-off-by: Hanjun Guo --- drivers/acpi/acpi_processor.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c index 0676b50..62c846b 100644 --- a/drivers/acpi/acpi_processor.c +++ b/drivers/acpi/acpi_processor.c @@ -215,7 +215,6 @@ static int acpi_processor_get_info(struct acpi_device *device) union acpi_object object = { 0 }; struct acpi_buffer buffer = { sizeof(union acpi_object), &object }; struct acpi_processor *pr = acpi_driver_data(device); - phys_cpuid_t phys_id; int device_declaration = 0; acpi_status status = AE_OK; static int cpu0_initialized; @@ -263,10 +262,10 @@ static int acpi_processor_get_info(struct acpi_device *device) pr->acpi_id = value; } - phys_id = acpi_get_phys_id(pr->handle, device_declaration, pr->acpi_id); - if (phys_id == PHYS_CPUID_INVALID) + pr->phys_id = acpi_get_phys_id(pr->handle, device_declaration, + pr->acpi_id); + if (pr->phys_id == PHYS_CPUID_INVALID) acpi_handle_debug(pr->handle, "failed to get CPU physical ID.\n"); - pr->phys_id = phys_id; pr->id = acpi_map_cpuid(pr->phys_id, pr->acpi_id); if (!cpu0_initialized && !acpi_has_cpu_in_madt()) {