Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2913980rwb; Mon, 15 Aug 2022 13:58:10 -0700 (PDT) X-Google-Smtp-Source: AA6agR7oEKtHRhVEKcuhgCL3McW5MFq6ws1+WG6cO2Zb7gc/i/orrFf4jbt5dFRHntY6CqBLrpyg X-Received: by 2002:a17:90b:3144:b0:1f5:829e:cd49 with SMTP id ip4-20020a17090b314400b001f5829ecd49mr30160506pjb.80.1660597079552; Mon, 15 Aug 2022 13:57:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660597079; cv=none; d=google.com; s=arc-20160816; b=M3ZXFocoMAdQ7z3QO4xqxdS053BNsbLk+1/RUceahPy0HLInP6TsxKnEsIXLumr3O0 6/ncoShHY6Amix8M7vCxiyOYvnYomdwgl3225DGbuZOGYh4IHWffQmbu+oaVT2Gvp2cY 67lBXfWX2e0+AuyuZKzVjtwRiegfq6w6gXklB3TA5SFyiOX9bVcrx+L5fZaMifyqgyyD f8k5PT7w1br3SnHOvebYRfr17Dbup7ebN8Jv7Bb0XLBksFRci9jUEhjs4lf5BZzhWEVn 8FxOwl3gt6n7KJo/sKYlQ2BQ4xl7l9prSweWJaZ7e97dH7kKREA57HYaJW+TM1/LviYV cRVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/EtxTSsTQDMeNF73lbQy9ZbSTULob+ny407utGWoy50=; b=zolYoU5QwwfYjH/tLICbndPsOklwlB57BQEu9rzwEPZfWRAr1uDNeqUPr99NkJD2pQ oWTtkNHosB6d7+kIQmQ8l5/MCOlbbzS7rO/JwycSgekuDzhE8N6mJvCZZGZj6pGx/2gh UbZs6brLWWHoJXcoyJION1gJ+zdP0isQbGcw7P+sQcOYuoz6UohfSLg7q8y/xL4piknk kQJrekiLLrzyjXdQAnNZdec+/FH+b186/ddjr/dvHpHPgIscmYGlELQtNtF8wWWO61E+ RJZsfNx92eSRTPw1SzP8vOp2PJ1zRfW4wdMFp7qAapMeparTOz/nC2IBgdGL1s1ef6N2 z0gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=eZV4FbM4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k12-20020a170902d58c00b0016ef6b7e298si11015392plh.157.2022.08.15.13.57.48; Mon, 15 Aug 2022 13:57:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=eZV4FbM4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344044AbiHOTOw (ORCPT + 99 others); Mon, 15 Aug 2022 15:14:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344143AbiHOTLu (ORCPT ); Mon, 15 Aug 2022 15:11:50 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0AA1150188; Mon, 15 Aug 2022 11:37:16 -0700 (PDT) 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 D6D866113C; Mon, 15 Aug 2022 18:37:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DDF8CC4314B; Mon, 15 Aug 2022 18:37:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660588635; bh=XaMbj9V8F6cyjECBekjmkj0GXiceZTtqfdngt5Y36Lg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eZV4FbM4ENjF7vSQCfyutLbQAf6JlnATwPA1XE6KisXZuIecQ/EIFrjhPj0PvVq2y ijtreCzYRjoMm6AVvYI6qaQQb1e7iPBpfezj701wefV9OIzT09Xmjkxkh3EVDMEWQe TlfUwMZs2zCJOJEGM5HWnpStSkyhOLa2cxMNwzro= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Quentin Perret , Marc Zyngier , Sasha Levin Subject: [PATCH 5.15 467/779] KVM: arm64: Dont return from void function Date: Mon, 15 Aug 2022 20:01:51 +0200 Message-Id: <20220815180357.260035085@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Quentin Perret [ Upstream commit 1c3ace2b8b3995d3213c5e2d2aca01a0577a3b0f ] Although harmless, the return statement in kvm_unexpected_el2_exception is rather confusing as the function itself has a void return type. The C standard is also pretty clear that "A return statement with an expression shall not appear in a function whose return type is void". Given that this return statement does not seem to add any actual value, let's not pointlessly violate the standard. Build-tested with GCC 10 and CLANG 13 for good measure, the disassembled code is identical with or without the return statement. Fixes: e9ee186bb735 ("KVM: arm64: Add kvm_extable for vaxorcism code") Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220705142310.3847918-1-qperret@google.com Signed-off-by: Sasha Levin --- arch/arm64/kvm/hyp/nvhe/switch.c | 2 +- arch/arm64/kvm/hyp/vhe/switch.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kvm/hyp/nvhe/switch.c b/arch/arm64/kvm/hyp/nvhe/switch.c index a34b01cc8ab9..4db5409f40c4 100644 --- a/arch/arm64/kvm/hyp/nvhe/switch.c +++ b/arch/arm64/kvm/hyp/nvhe/switch.c @@ -279,5 +279,5 @@ void __noreturn hyp_panic(void) asmlinkage void kvm_unexpected_el2_exception(void) { - return __kvm_unexpected_el2_exception(); + __kvm_unexpected_el2_exception(); } diff --git a/arch/arm64/kvm/hyp/vhe/switch.c b/arch/arm64/kvm/hyp/vhe/switch.c index d88d3c143a73..813e6e2178c1 100644 --- a/arch/arm64/kvm/hyp/vhe/switch.c +++ b/arch/arm64/kvm/hyp/vhe/switch.c @@ -220,5 +220,5 @@ void __noreturn hyp_panic(void) asmlinkage void kvm_unexpected_el2_exception(void) { - return __kvm_unexpected_el2_exception(); + __kvm_unexpected_el2_exception(); } -- 2.35.1