From patchwork Fri Mar 27 14:02:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 46421 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D072F21597 for ; Fri, 27 Mar 2015 14:04:00 +0000 (UTC) Received: by wgfh4 with SMTP id h4sf11168064wgf.1 for ; Fri, 27 Mar 2015 07:04:00 -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=b5LZ8Z6dxaB0xeaZBAYd0VTUqtjNqLc1nrba9xA7NGMoGXxl+SB15bVKjfueezBKJf rASCASJWXHPXt5eNhs7LU+BkGmFmy2WgjQ8AFwqWTQ4kJeTuuXlTg3Uy+ZvNys/u6DNW BIiDs0mGFM3HhUmX91oPpwSwPwQgLByLT1xyRmtrKzhfu0+WZs0YN0Mm9Szw8LkfTzdI xjoSLY0+NtzXCF1ovJKfYVTTaE16XSei34UT7PWqbPfIfXSD5TdDxu1QExsRfNj6jg+G CX5coHAW3gZ7XAIwk3DDh+FDgUgOEbDSuCd1XOdenH8LS5mI1Bgm+khmTlnpQr/vlhkc ZiWA== X-Gm-Message-State: ALoCoQmEVGFDCHG6Y04Y2BCzq155vhTFBywwpkl2gwBygzzI1psa2+zDcm62AA5W3l9ialNWHuBf X-Received: by 10.112.142.1 with SMTP id rs1mr4641538lbb.19.1427465040178; Fri, 27 Mar 2015 07:04:00 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.28.100 with SMTP id a4ls380686lah.23.gmail; Fri, 27 Mar 2015 07:03:59 -0700 (PDT) X-Received: by 10.152.26.136 with SMTP id l8mr17971414lag.109.1427465039867; Fri, 27 Mar 2015 07:03:59 -0700 (PDT) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id cj11si1460292lbd.113.2015.03.27.07.03.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Mar 2015 07:03:59 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by lboc7 with SMTP id c7so7418232lbo.1 for ; Fri, 27 Mar 2015 07:03:59 -0700 (PDT) X-Received: by 10.152.120.134 with SMTP id lc6mr17720189lab.72.1427465039741; Fri, 27 Mar 2015 07:03:59 -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 k9csp1280545lbq; Fri, 27 Mar 2015 07:03:58 -0700 (PDT) X-Received: by 10.67.10.47 with SMTP id dx15mr35916310pad.139.1427465037743; Fri, 27 Mar 2015 07:03:57 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fj8si2997794pad.135.2015.03.27.07.03.56; Fri, 27 Mar 2015 07:03:57 -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 S1030187AbbC0ODt (ORCPT + 27 others); Fri, 27 Mar 2015 10:03:49 -0400 Received: from mail-pd0-f170.google.com ([209.85.192.170]:34613 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752957AbbC0ODq (ORCPT ); Fri, 27 Mar 2015 10:03:46 -0400 Received: by pdbni2 with SMTP id ni2so97521931pdb.1 for ; Fri, 27 Mar 2015 07:03:45 -0700 (PDT) X-Received: by 10.67.24.71 with SMTP id ig7mr35244935pad.99.1427465025767; Fri, 27 Mar 2015 07:03:45 -0700 (PDT) Received: from localhost ([104.207.83.1]) by mx.google.com with ESMTPSA id ms7sm2335830pdb.8.2015.03.27.07.03.43 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 27 Mar 2015 07:03:44 -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 22:02:23 +0800 Message-Id: <1427464948-14564-3-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1427464948-14564-1-git-send-email-hanjun.guo@linaro.org> References: <1427464948-14564-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.217.182 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()) {