Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5654374pxb; Mon, 14 Feb 2022 04:34:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJzdrsxPRNWmZy7I3Stvb9PUdrsGVrDuqpTRHmQg0VDgMSVBRzaptALv7lEM3pGGKRbqgvZD X-Received: by 2002:a05:6402:43ca:: with SMTP id p10mr15203054edc.212.1644842088468; Mon, 14 Feb 2022 04:34:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644842088; cv=none; d=google.com; s=arc-20160816; b=JYYC3PsAKkWit1IuBU56YflulAX/AvBqtAE5Mq5xNzWZiwGViibYzxZ9ey9AERiSbL HuUUSiEFx8ZRok/mGvFhIGqypHUBi+VURadV9uuvZ7ZHKTq8iSo7WbEY6Fh3k5wi2CMe 0IIHwGBj9BBiQXGCXiH7DIZaPFJoyK93ABCg/YOZMeAAlf+nOppKw97Dso4N137dcXe9 OpKlbd3VDTRZS7904KJEmC2Txi8H5PBE+Pjg/J/wj04Y7GpFGNkx7jQW4LUYsPHPAGIB x5K73tS87gMRkdxm5MPvAET2WYdzDiD3OmIkgsiKkGhgipAMHcAKELiEeFgFm48OqreD MWUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=hv0jESm6sdIG8SHwCNJthW/Yd70+/dh+uxsK9EZGFy0=; b=HuSezUQiw3bUmZops7clXautrqGwa53CCTzBiylfMFPfE8oKYp0QfSJQYNQFQhfK6O M3wjDyxVW40iedZJa/kEENqkTiiAYX/n73mQias6a9TCLfXCN3iVO1QYctQiQyWbxqFs R2NtRSnCOgsjVCrBF8pqZ93p2Xufx/XKOSdAPCYDO2U5FMrmdxJNNnfFgzKGLtcSI57s CDh+SYeQgulbhL3Rllw8Mtvyj7qzmucjzPBmDGZ+tzoMof5w2c4WZ3LJi/Kjmx7k1K4d pFMj4kGkuggsUeM+SUVeRtn75CZSuyzqy8z36lFSjTI4LgAtfUewU4xf8Ea4/2Tlqy1D 9opw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=iostq3mE; 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=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g3si24909145ejt.547.2022.02.14.04.34.24; Mon, 14 Feb 2022 04:34:48 -0800 (PST) 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=@gmx.net header.s=badeba3b8450 header.b=iostq3mE; 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=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242879AbiBNJZG (ORCPT + 99 others); Mon, 14 Feb 2022 04:25:06 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:38820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235801AbiBNJZF (ORCPT ); Mon, 14 Feb 2022 04:25:05 -0500 Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCAEE60A89; Mon, 14 Feb 2022 01:24:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1644830679; bh=bPwqzMydBgKUCCPAcnpWEevOwrjSEKacihSgwMc0jc4=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=iostq3mEM/MOJNzagGc2y1i3Y05rII7z/NhlaQiyUbyXunuVAbarmNO/rWdo9xJIG Vdh5Ow8y1U5FZNOdkaBid272QPDu/tzE6mcnrrSE++hoHwixxHA08Uytf0DAqdq/np WOpyi2gw7rg+RBCA7ZXGPairX8MzSBabv/qkfsF0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.123.55] ([88.152.144.107]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MIdif-1nY7vO2GKj-00Edn1; Mon, 14 Feb 2022 10:24:39 +0100 Message-ID: <9cd9f149-d2ea-eb55-b774-8d817b9b6cc9@gmx.de> Date: Mon, 14 Feb 2022 10:24:22 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: [PATCH] riscv/efi_stub: Fix get_boot_hartid_from_fdt() return value Content-Language: en-US To: Andreas Schwab 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, Anup Patel , stable@vger.kernel.org, Sunil V L References: <20220128045004.4843-1-sunilvl@ventanamicro.com> <877d9xx14f.fsf@igel.home> From: Heinrich Schuchardt In-Reply-To: <877d9xx14f.fsf@igel.home> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:Au/e3vMlDZkTXGdYorj9+mhhI0kX2Yew6mxWnv2QGwXtTeAfS/B GC0CYZsekBZfnzXD4vQVL/bx8xJHpAaGKrFLun/Ih7miykJsovZHN4EABrb6DE/aB82u+CT k5c1fbeV8pG17cyAa13L6Z8lVVvBfrq/uV8UwY2JaLXw2tPkV05PLZhFL6PL5/XCgt2mzv1 QptnAnKEGT+5Wc5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W9kboe0 2UHKqP4mtqsKepGO/XjMBlOoKewGj+fYySTjde+bMKWZfGAuPIZ5ljSpiKmVCDfa20uokMbQQ JNVEpb4tJlugaM= X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,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 On 2/14/22 10:12, Andreas Schwab wrote: > On Jan 28 2022, Sunil V L wrote: > >> diff --git a/drivers/firmware/efi/libstub/riscv-stub.c b/drivers/firmwa= re/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". > set_boot_hartid() implies that the caller can change the boot hart ID. As this is not a case this name obviously would be a misnomer. Best regards Heinrich