From patchwork Fri Mar 27 13:55:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 46407 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 391BD21597 for ; Fri, 27 Mar 2015 13:56:22 +0000 (UTC) Received: by lajy8 with SMTP id y8sf607636laj.3 for ; Fri, 27 Mar 2015 06:56:21 -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=V3ZG82G3gATg9CMgk8KhUGWZpBeo4ySpYXBcasnblos=; b=ZBM7rVAzQ2z1sopjW76ml1/bA5GCIdYUmJ6sHMYoWoplpWAUlL12Bz951wmwxthtLs q2ofjyxY2qeDhg5kJ7v9V7ERjwBz/7JlNZHSVOA5t81oxXCFqc47KcnDSt+z8YOH2Qb2 03ilzraQ8KXrGUXydm9ALXT4GegfsuMlq5aAPBVWDWIXgavKZl4ZttxWAfJSCuNJbKfu gamEt56zMqWbiAN9zDdEdQQvnRbYf5D+p9UHCuOLmdXfuOWzGMYCuY8oNQq7SgQB3LUH p7arTXHjVBBQqOtl5AllrcBsJJcgbMAKg5C/ZTRqaRG5780LmewUc3Yws2XTboh1J6RN G6cw== X-Gm-Message-State: ALoCoQmjjq/c6wru31TieREyDy63YmAxc15LMG9/MF6/1O/c1nDZwih0YSNguVLUCKgqoDRKq7Ig X-Received: by 10.112.118.203 with SMTP id ko11mr4617728lbb.15.1427464580951; Fri, 27 Mar 2015 06:56:20 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.7.172 with SMTP id dd12ls185742lad.53.gmail; Fri, 27 Mar 2015 06:56:20 -0700 (PDT) X-Received: by 10.152.163.2 with SMTP id ye2mr17712113lab.89.1427464580777; Fri, 27 Mar 2015 06:56:20 -0700 (PDT) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id b17si1452509lbo.82.2015.03.27.06.56.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Mar 2015 06:56:20 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by labto5 with SMTP id to5so71168229lab.0 for ; Fri, 27 Mar 2015 06:56:20 -0700 (PDT) X-Received: by 10.112.212.106 with SMTP id nj10mr17919791lbc.36.1427464580658; Fri, 27 Mar 2015 06:56:20 -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.57.201 with SMTP id k9csp1275858lbq; Fri, 27 Mar 2015 06:56:19 -0700 (PDT) X-Received: by 10.70.134.74 with SMTP id pi10mr35022575pdb.119.1427464569942; Fri, 27 Mar 2015 06:56:09 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ee5si2969559pac.139.2015.03.27.06.56.09; Fri, 27 Mar 2015 06:56:09 -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 S932142AbbC0N4D (ORCPT + 27 others); Fri, 27 Mar 2015 09:56:03 -0400 Received: from mail-pd0-f182.google.com ([209.85.192.182]:33298 "EHLO mail-pd0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753087AbbC0Nz7 (ORCPT ); Fri, 27 Mar 2015 09:55:59 -0400 Received: by pdnc3 with SMTP id c3so97460647pdn.0 for ; Fri, 27 Mar 2015 06:55:59 -0700 (PDT) X-Received: by 10.70.46.65 with SMTP id t1mr35254965pdm.128.1427464559222; Fri, 27 Mar 2015 06:55:59 -0700 (PDT) Received: from localhost ([104.207.83.1]) by mx.google.com with ESMTPSA id ap4sm2313269pbd.2.2015.03.27.06.55.57 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 27 Mar 2015 06:55:58 -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 2/7] ACPI / processor: remove phys_id in acpi_processor_get_info() Date: Fri, 27 Mar 2015 21:55:07 +0800 Message-Id: <1427464513-14414-4-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1427464513-14414-1-git-send-email-hanjun.guo@linaro.org> References: <1427464513-14414-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.44 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()) {