From patchwork Fri Mar 27 12:14:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 46402 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6E66521585 for ; Fri, 27 Mar 2015 12:15:34 +0000 (UTC) Received: by wixm2 with SMTP id m2sf4262167wix.0 for ; Fri, 27 Mar 2015 05:15:33 -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=wDQs8ugU7TqyEePpm0fnA6Frw4+MYdKPOe/FjWxQc64=; b=Qk65Sq95dM4FRQsjrKH3l0pRSfKrHjR6b5xNJIoUqN1D1T1GkeuJeseea1CvxPlf43 uvGs181jtNIJoNPcYsdi6p9lFPfKYK7sEJXA3RLwU5JrcKejRq3ZRGaNEyUUPN2xJJu+ weMAk1Mxhy9LJqf8cwhxTw+/jZvjxzPEcYSTsgmbwTDde3jbjS258IJEdueqXvPqZHGd 5lWQWqgLCRwPKkGddar4A+SlncjdncOGNO8ZPfJViCdYxLaZhShDkwg9gHMmDVUJVGrZ NhLXB+AwvTgnTRhgRXBoa2UbFG93meNHbyQ+WKBOWMhiH7nHnszv+IrAtnA4idn9KYML jsGw== X-Gm-Message-State: ALoCoQkKq83jggAYgN2vGlIhPVFMfiI37t8O5Nw+1UIvJnM0x2I9l126Jm472jrQs4xk5LjqO/9q X-Received: by 10.180.90.169 with SMTP id bx9mr6793653wib.6.1427458533710; Fri, 27 Mar 2015 05:15:33 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.87.70 with SMTP id v6ls350243laz.2.gmail; Fri, 27 Mar 2015 05:15:33 -0700 (PDT) X-Received: by 10.152.180.202 with SMTP id dq10mr17004632lac.74.1427458533389; Fri, 27 Mar 2015 05:15:33 -0700 (PDT) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id z5si1288828lbf.103.2015.03.27.05.15.33 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Mar 2015 05:15:33 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by labto5 with SMTP id to5so68978410lab.0 for ; Fri, 27 Mar 2015 05:15:33 -0700 (PDT) X-Received: by 10.152.36.133 with SMTP id q5mr10969149laj.35.1427458533258; Fri, 27 Mar 2015 05:15:33 -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 k9csp1220243lbq; Fri, 27 Mar 2015 05:15:32 -0700 (PDT) X-Received: by 10.68.143.65 with SMTP id sc1mr34695440pbb.2.1427458531066; Fri, 27 Mar 2015 05:15:31 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tb7si2636040pac.140.2015.03.27.05.15.25; Fri, 27 Mar 2015 05:15:31 -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 S1753148AbbC0MPV (ORCPT + 27 others); Fri, 27 Mar 2015 08:15:21 -0400 Received: from mail-pa0-f52.google.com ([209.85.220.52]:33146 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753019AbbC0MPN (ORCPT ); Fri, 27 Mar 2015 08:15:13 -0400 Received: by pabxg6 with SMTP id xg6so94331463pab.0 for ; Fri, 27 Mar 2015 05:15:12 -0700 (PDT) X-Received: by 10.68.223.36 with SMTP id qr4mr34735665pbc.50.1427458512563; Fri, 27 Mar 2015 05:15:12 -0700 (PDT) Received: from localhost ([104.207.83.1]) by mx.google.com with ESMTPSA id hr5sm2039665pbb.44.2015.03.27.05.15.10 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 27 Mar 2015 05:15:11 -0700 (PDT) From: Hanjun Guo To: Will Deacon , Catalin Marinas Cc: Lorenzo Pieralisi , Mark Rutland , Sudeep Holla , "Rafael J. Wysocki" , linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linaro-acpi@lists.linaro.org, Hanjun Guo Subject: [PATCH 2/2] ARM64 / ACPI: make acpi_map_gic_cpu_interface() as void function Date: Fri, 27 Mar 2015 20:14:36 +0800 Message-Id: <1427458476-20140-2-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1427458476-20140-1-git-send-email-hanjun.guo@linaro.org> References: <1427458476-20140-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.48 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: , Since the only caller of acpi_parse_gic_cpu_interface() doesn't need the return value, make it have a void return type to avoid introducing subtle bugs, and update the comments of the function accordingly. Signed-off-by: Hanjun Guo --- arch/arm64/kernel/acpi.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c index c263cba..8b83955 100644 --- a/arch/arm64/kernel/acpi.c +++ b/arch/arm64/kernel/acpi.c @@ -98,12 +98,8 @@ void __init __acpi_unmap_table(char *map, unsigned long size) /** * acpi_map_gic_cpu_interface - generates a logical cpu number * and map to MPIDR represented by GICC structure - * @mpidr: CPU's hardware id to register, MPIDR represented in MADT - * @enabled: this cpu is enabled or not - * - * Returns the logical cpu number which maps to MPIDR */ -static int __init +static void __init acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor) { int i; @@ -112,17 +108,17 @@ acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor) if (mpidr == INVALID_HWID) { pr_info("Skip MADT cpu entry with invalid MPIDR\n"); - return -EINVAL; + return; } total_cpus++; if (!enabled) - return -EINVAL; + return; if (enabled_cpus >= NR_CPUS) { pr_warn("NR_CPUS limit of %d reached, Processor %d/0x%llx ignored.\n", NR_CPUS, total_cpus, mpidr); - return -EINVAL; + return; } /* Check if GICC structure of boot CPU is available in the MADT */ @@ -130,7 +126,7 @@ acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor) if (bootcpu_valid) { pr_err("Firmware bug, duplicate CPU MPIDR: 0x%llx in MADT\n", mpidr); - return -EINVAL; + return; } bootcpu_valid = true; @@ -145,28 +141,27 @@ acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor) if (cpu_logical_map(i) == mpidr) { pr_err("Firmware bug, duplicate CPU MPIDR: 0x%llx in MADT\n", mpidr); - return -EINVAL; + return; } } if (!acpi_psci_present()) - return -EOPNOTSUPP; + return; cpu_ops[enabled_cpus] = cpu_get_ops("psci"); /* CPU 0 was already initialized */ if (enabled_cpus) { if (!cpu_ops[enabled_cpus]) - return -EINVAL; + return; if (cpu_ops[enabled_cpus]->cpu_init(NULL, enabled_cpus)) - return -EOPNOTSUPP; + return; /* map the logical cpu id to cpu MPIDR */ cpu_logical_map(enabled_cpus) = mpidr; } enabled_cpus++; - return enabled_cpus; } static int __init