From patchwork Mon Mar 7 09:18:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 12771432 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 79186C433EF for ; Mon, 7 Mar 2022 09:27:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=a0waqBR3GdeRYisySm5P8xHvE+Nmw2Y7SWtM1ppANhY=; b=1T1a1XBoZmfpR7 MUDc9jfyOcI/zQ2LM08G/S9It/k5RsfiqP5OEgxrvoRu0AT3WcfiNEXFG0A6/+ZfhMVovZAjZhZpR Bj8ZcuuWp7rZ0J/r0XlYaJxGssNnKvi4W4insNH4OQju0dzoXqM9xxa1YrNNTiFCfmGhlwFD46Vgv stVGMxMUr6CCC1K3qDwe4OclGBuVdY+eku8TjDZu9rZuAbb7o8qbTut9MndXZz/ZVfo2y6hp1saaD wZQ9Dxh00hx7jGwJf/5gm6o33/T9H9koj+urW/fF4BVsUbTLTnV1kuWAofi1CMjEpeUF0MPoqLTIv zB0EbUCltGnyg2Y/Q/OA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nR9cg-00Gk5I-Bc; Mon, 07 Mar 2022 09:25:46 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nR9X6-00GhK7-5E for linux-arm-kernel@lists.infradead.org; Mon, 07 Mar 2022 09:20:01 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 91C1D60F63; Mon, 7 Mar 2022 09:19:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0D698C340E9; Mon, 7 Mar 2022 09:19:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1646644799; bh=w/LSniU9HL7T8izO5RIoccVJlyRX4WWQVkesBO8mLoU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AK2wbqW10TMccMvsTAaD5wbBQ0MZvJ/5tpjQwsD5X/dqTlz5uZt/a4tLA+4HAqP+O HmFz30XGO66jBOWD9EkuuTlnP0jePpWOm5lLMh3VeAIfjLtZaad8W2hYEMCrJCsq/i HiUTGuKU8wYFkmDCcqExomyD+ZvLJdxZmbhYfV0E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Randy Dunlap , Igor Zhbanov , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-arm-kernel@lists.infradead.org, patches@armlinux.org.uk, "Russell King (Oracle)" Subject: [PATCH 4.9 25/32] ARM: 9182/1: mmu: fix returns from early_param() and __setup() functions Date: Mon, 7 Mar 2022 10:18:51 +0100 Message-Id: <20220307091635.153023221@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220307091634.434478485@linuxfoundation.org> References: <20220307091634.434478485@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220307_012000_294843_DC7A84B3 X-CRM114-Status: GOOD ( 12.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Randy Dunlap commit 7b83299e5b9385943a857d59e15cba270df20d7e upstream. early_param() handlers should return 0 on success. __setup() handlers should return 1 on success, i.e., the parameter has been handled. A return of 0 would cause the "option=value" string to be added to init's environment strings, polluting it. ../arch/arm/mm/mmu.c: In function 'test_early_cachepolicy': ../arch/arm/mm/mmu.c:215:1: error: no return statement in function returning non-void [-Werror=return-type] ../arch/arm/mm/mmu.c: In function 'test_noalign_setup': ../arch/arm/mm/mmu.c:221:1: error: no return statement in function returning non-void [-Werror=return-type] Fixes: b849a60e0903 ("ARM: make cr_alignment read-only #ifndef CONFIG_CPU_CP15") Signed-off-by: Randy Dunlap Reported-by: Igor Zhbanov Cc: Uwe Kleine-König Cc: linux-arm-kernel@lists.infradead.org Cc: patches@armlinux.org.uk Signed-off-by: Russell King (Oracle) Signed-off-by: Greg Kroah-Hartman --- arch/arm/mm/mmu.c | 2 ++ 1 file changed, 2 insertions(+) --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -228,12 +228,14 @@ early_param("ecc", early_ecc); static int __init early_cachepolicy(char *p) { pr_warn("cachepolicy kernel parameter not supported without cp15\n"); + return 0; } early_param("cachepolicy", early_cachepolicy); static int __init noalign_setup(char *__unused) { pr_warn("noalign kernel parameter not supported without cp15\n"); + return 1; } __setup("noalign", noalign_setup);