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 13B66C7618E for ; Fri, 17 Mar 2023 14:53:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231295AbjCQOxg (ORCPT ); Fri, 17 Mar 2023 10:53:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229772AbjCQOxe (ORCPT ); Fri, 17 Mar 2023 10:53:34 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56FF140C0; Fri, 17 Mar 2023 07:53:33 -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 sin.source.kernel.org (Postfix) with ESMTPS id 7ED76CE207D; Fri, 17 Mar 2023 14:53:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0DE28C433D2; Fri, 17 Mar 2023 14:53:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679064809; bh=vBinUK6v5Vl5tjes02qFnk41gtDZSyYAjCozcqBYGOg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ATGrVhcCGjXq20/8tlDohKbJjObLMoBeeDqjkavcP8PsQZUcu/3gkKRq695Ekwa4P EE/erBS/51411S7N71v+9NgNwr9T47AuPR1rp6eKR+/cIEjShthAyeQUUdhy+qKUR8 bi6k9HbzikT1kbLrPW+/6GCO/JePG1J4zut/Ly+8dV2vaJ4mSfm1wAJ+weGcZKM+cY Db3KTE8SXEe/gfm4vPN77fMR7ow+dqa6sQtcbylCbIQQ0T7mkmERoz5eeJhW/z6n+J Uds95AvmIrOMhDsJc03P2JtLVCN7b5eKh//ESOTJkQ2oYHn1m9RW1d8Iu9bgbt5Ph9 KJJPfY1JGNRIg== Date: Fri, 17 Mar 2023 07:53:27 -0700 From: Josh Poimboeuf To: "Michael Kelley (LINUX)" Cc: "Guilherme G. Piccoli" , "x86@kernel.org" , "linux-hyperv@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Dexuan Cui , Haiyang Zhang , KY Srinivasan , "wei.liu@kernel.org" , "tglx@linutronix.de" , "mingo@redhat.com" , "bp@alien8.de" , "dave.hansen@linux.intel.com" , "hpa@zytor.com" , "thomas.lendacky@amd.com" , "peterz@infradead.org" , "kernel-dev@igalia.com" , "kernel@gpiccoli.net" , Arnd Bergmann Subject: Re: [PATCH v2] x86/hyperv: Mark hv_ghcb_terminate() as noreturn Message-ID: <20230317145327.sl7kzgxtlqgrte7j@treble> References: <20230310152442.cbrjise6uex4ak4x@treble> <20230310154452.1169204-1-gpiccoli@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 17, 2023 at 01:40:25PM +0000, Michael Kelley (LINUX) wrote: > From: Guilherme G. Piccoli Sent: Thursday, March 16, 2023 2:24 PM > > > > On 10/03/2023 18:17, Michael Kelley (LINUX) wrote: > > > [...] > > > Just curious: Should the actual function also be updated with > > > __noreturn? In similar situations, such as snp_abort(), the > > > __noreturn attribute is both places. I don't know what the > > > guidance is on this question. > > > > > > > Hi Michael / Josh (and all), lemme know if you want me to submit a V3 > > doing that. The function is not called inside this own definition file > > nor exported, so I'm not sure that'd be necessary, but glad to do so if > > you prefer. > > > > I don't have a preference. I was just trying to make sure the details > are all correct. I'll defer to those with more knowledge of the > __noreturn attribute than I have. It's not required, but probably good practice to put __noreturn in both places to make it more self-documenting. -- Josh