From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80DE9C433FE for ; Mon, 14 Feb 2022 09:18:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242770AbiBNJSL (ORCPT ); Mon, 14 Feb 2022 04:18:11 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:35538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235383AbiBNJSK (ORCPT ); Mon, 14 Feb 2022 04:18:10 -0500 X-Greylist: delayed 308 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 14 Feb 2022 01:18:03 PST Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F098606D7; Mon, 14 Feb 2022 01:18:03 -0800 (PST) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4Jxz5Z129sz1sr4Y; Mon, 14 Feb 2022 10:12:50 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4Jxz5Y6ThLz1qqkD; Mon, 14 Feb 2022 10:12:49 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id pdJ6wzpt_XJf; Mon, 14 Feb 2022 10:12:48 +0100 (CET) X-Auth-Info: i81bJA8adEdhuMnwODt1w9ZYPCIJmRzN5xVOLlFPDwvVOgLBggv7jog9GhkXrxg2 Received: from igel.home (ppp-46-244-178-131.dynamic.mnet-online.de [46.244.178.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Mon, 14 Feb 2022 10:12:48 +0100 (CET) Received: by igel.home (Postfix, from userid 1000) id 375862C39FF; Mon, 14 Feb 2022 10:12:48 +0100 (CET) From: Andreas Schwab To: Sunil V L Cc: Ard Biesheuvel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Atish Patra , linux-efi@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Heinrich Schuchardt , Anup Patel , stable@vger.kernel.org Subject: Re: [PATCH] riscv/efi_stub: Fix get_boot_hartid_from_fdt() return value References: <20220128045004.4843-1-sunilvl@ventanamicro.com> X-Yow: .. If I cover this entire WALL with MAZOLA, who I have to give my AGENT ten per cent?? Date: Mon, 14 Feb 2022 10:12:48 +0100 In-Reply-To: <20220128045004.4843-1-sunilvl@ventanamicro.com> (Sunil V. L.'s message of "Fri, 28 Jan 2022 10:20:04 +0530") Message-ID: <877d9xx14f.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Jan 28 2022, Sunil V L wrote: > diff --git a/drivers/firmware/efi/libstub/riscv-stub.c b/drivers/firmware/efi/libstub/riscv-stub.c > index 380e4e251399..9c460843442f 100644 > --- a/drivers/firmware/efi/libstub/riscv-stub.c > +++ b/drivers/firmware/efi/libstub/riscv-stub.c > @@ -25,7 +25,7 @@ typedef void __noreturn (*jump_kernel_func)(unsigned int, unsigned long); > > static u32 hartid; > > -static u32 get_boot_hartid_from_fdt(void) > +static int get_boot_hartid_from_fdt(void) I think the function should be renamed, now that it no longer returns the hart ID, but initializes a static variable as a side effect. Thus it no longer "gets", but "sets". -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."