From patchwork Tue May 5 02:46:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 48010 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 51BD82121F for ; Tue, 5 May 2015 02:47:51 +0000 (UTC) Received: by layy10 with SMTP id y10sf50845340lay.0 for ; Mon, 04 May 2015 19:47:50 -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=j1pW3QlmKVf6/S97iwKeXFREO+v5AwXUjMv49uf88hE=; b=ElGj/rCKsg0V+mRb/UA/mXfIrAvHqwT+f3fJqpuc1eoKa09Y5uSnTpPpA8a3x73NmE 9iOqG8yzo3xhF2XYX94Fd60LMnQeKY455+7SuNMEDCbC+9eUs1dxsQy6O1xbPBHqGalL q4xhUzFRSL8v7FhhIyILg5gUw3jwo3od/L6WzI4epcXC+a0MaxCo7pm1hNup7eaPnhZO psH2n9Don6NUl+o9mC50xMKmbRTmzHGFeKaT93y1MwE4BRF5bKF64JzGP08cxzk0Pltu QZL3ldONv5DRUwle6ntABbhUTtt+0BJaQuvu7gbRKUk40zfa5I/iAI01G7hokbH5c0cq gIzA== X-Gm-Message-State: ALoCoQn+dX42GfEM9Timya5N/Z3VzVC5j21x9avt3tl0ge3od7XlJuDee9pFvs3nM/bNR2dsxJuS X-Received: by 10.180.88.226 with SMTP id bj2mr510740wib.7.1430794070279; Mon, 04 May 2015 19:47:50 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.4.162 with SMTP id l2ls828031lal.93.gmail; Mon, 04 May 2015 19:47:50 -0700 (PDT) X-Received: by 10.112.159.9 with SMTP id wy9mr21444550lbb.120.1430794070123; Mon, 04 May 2015 19:47:50 -0700 (PDT) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id h2si11270093lag.151.2015.05.04.19.47.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 May 2015 19:47:49 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by lbbqq2 with SMTP id qq2so118144026lbb.3 for ; Mon, 04 May 2015 19:47:49 -0700 (PDT) X-Received: by 10.152.37.228 with SMTP id b4mr21642654lak.117.1430794069842; Mon, 04 May 2015 19:47:49 -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.67.65 with SMTP id l1csp1987296lbt; Mon, 4 May 2015 19:47:49 -0700 (PDT) X-Received: by 10.68.57.237 with SMTP id l13mr47346262pbq.100.1430794065122; Mon, 04 May 2015 19:47:45 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b12si22104474pbu.238.2015.05.04.19.47.44; Mon, 04 May 2015 19:47:45 -0700 (PDT) Received-SPF: none (google.com: linux-acpi-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 S965411AbbEECrl (ORCPT + 7 others); Mon, 4 May 2015 22:47:41 -0400 Received: from mail-pa0-f52.google.com ([209.85.220.52]:36779 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965407AbbEECri (ORCPT ); Mon, 4 May 2015 22:47:38 -0400 Received: by pabsx10 with SMTP id sx10so177869111pab.3 for ; Mon, 04 May 2015 19:47:36 -0700 (PDT) X-Received: by 10.68.94.225 with SMTP id df1mr32847207pbb.89.1430794056813; Mon, 04 May 2015 19:47:36 -0700 (PDT) Received: from localhost ([180.150.157.4]) by mx.google.com with ESMTPSA id yc2sm14070658pbb.87.2015.05.04.19.47.35 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 04 May 2015 19:47:36 -0700 (PDT) From: Hanjun Guo To: "Rafael J. Wysocki" Cc: Will Deacon , Catalin Marinas , Boris Ostrovsky , Stefano Stabellini , Lorenzo Pieralisi , Sudeep Holla , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linaro-acpi@lists.linaro.org, Hanjun Guo Subject: [PATCH v2 2/7] ACPI / processor: remove phys_id in acpi_processor_get_info() Date: Tue, 5 May 2015 10:46:33 +0800 Message-Id: <1430793998-21631-3-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1430793998-21631-1-git-send-email-hanjun.guo@linaro.org> References: <1430793998-21631-1-git-send-email-hanjun.guo@linaro.org> Sender: linux-acpi-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-acpi@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.217.178 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 d6ac918..95492d0 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()) {