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: 6106531 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1A128BF90F for ; Fri, 27 Mar 2015 12:18:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2D58A20155 for ; Fri, 27 Mar 2015 12:18:09 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3DCB920304 for ; Fri, 27 Mar 2015 12:18:08 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YbTB5-00076J-AQ; Fri, 27 Mar 2015 12:15:55 +0000 Received: from mail-pa0-f54.google.com ([209.85.220.54]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YbTAj-0006pN-S8 for linux-arm-kernel@lists.infradead.org; Fri, 27 Mar 2015 12:15:34 +0000 Received: by padcy3 with SMTP id cy3so94212143pad.3 for ; Fri, 27 Mar 2015 05:15:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ou5B14QS9MFQkp4Ojz5sg0STvbn+t8tMFUYyPwCpoIo=; b=T6/+EfuqhwMIfndmS5JLLHMirFW9uEZdGsdTZEbtGY80KrC42ikZ479VVmGd+y0jsm uhcZviEMmXnWsNUlT2vjF7i0+3vl7XgHD1YZOR8vnHL21ZGgB7TcEOOgslTbvcQOrzd1 OH+gN+dgS4AXM1Aly9mA3d99ye4bnKhN/G+4kAqnn+e5fYO30w3pc4U2iNBiZHgaoVR7 Y0EhsUpDBJPG9HRD+b27/xt+GjriLlIgApZusaUo9DnkVP98IX3wg52vQzqdnILFrk73 LQMMA1nCitI9HOFmTZNcaj4lDL+sL0kjRFMkoHh/MNDw94eTWDnOFiWzqk1ANRd5o2/G 5bgQ== X-Gm-Message-State: ALoCoQmdKRQKwG5M+ErLcLY0MAUk1kkRygdH/JbAR83K2VcZAjgylBHFuj1avJ/S1ViXV0wG9zXo 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150327_051533_982265_189B077C X-CRM114-Status: GOOD ( 12.19 ) X-Spam-Score: -0.7 (/) Cc: Mark Rutland , Lorenzo Pieralisi , linaro-acpi@lists.linaro.org, "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, Hanjun Guo , Sudeep Holla , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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