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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 E75FCCDB482 for ; Tue, 17 Oct 2023 16:36:36 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.618310.961801 (Exim 4.92) (envelope-from ) id 1qsn3O-0001XZ-9L; Tue, 17 Oct 2023 16:36:22 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 618310.961801; Tue, 17 Oct 2023 16:36:22 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qsn3O-0001XS-6r; Tue, 17 Oct 2023 16:36:22 +0000 Received: by outflank-mailman (input) for mailman id 618310; Tue, 17 Oct 2023 16:36:21 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qsn3N-0001XM-0C for xen-devel@lists.xenproject.org; Tue, 17 Oct 2023 16:36:21 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 4c46517c-6d0b-11ee-9b0e-b553b5be7939; Tue, 17 Oct 2023 18:36:18 +0200 (CEST) Received: from support.bugseng.com (support.bugseng.com [162.55.131.47]) by support.bugseng.com (Postfix) with ESMTPA id 6670B4EE0738; Tue, 17 Oct 2023 18:36:18 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 4c46517c-6d0b-11ee-9b0e-b553b5be7939 MIME-Version: 1.0 Date: Tue, 17 Oct 2023 18:36:18 +0200 From: Nicola Vetrini To: Jan Beulich Cc: sstabellini@kernel.org, michal.orzel@amd.com, xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com, consulting@bugseng.com, andrew.cooper3@citrix.com, roger.pau@citrix.com, George Dunlap , Julien Grall , Wei Liu , xen-devel@lists.xenproject.org Subject: Re: [XEN PATCH][for-4.19 v2 6/7] xen/console: make function static inline In-Reply-To: References: <6ca7d9834079b7824f9432799cce2308aa88d159.1696833629.git.nicola.vetrini@bugseng.com> <5cad5cef-27b7-58ef-42f1-8c4a83497f4b@suse.com> <1dd47c07730ae143963891d79148e8f0@bugseng.com> User-Agent: Roundcube Webmail/1.4.3 Message-ID: <229f4b85a9aef936d2f9864874de6d9f@bugseng.com> X-Sender: nicola.vetrini@bugseng.com Organization: BUGSENG s.r.l. Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit On 17/10/2023 18:26, Jan Beulich wrote: > On 17.10.2023 17:24, Nicola Vetrini wrote: >> On 16/10/2023 16:52, Jan Beulich wrote: >>> On 09.10.2023 08:54, Nicola Vetrini wrote: >>>> --- a/xen/include/xen/consoled.h >>>> +++ b/xen/include/xen/consoled.h >>>> @@ -12,7 +12,7 @@ size_t consoled_guest_tx(char c); >>>> >>>> #else >>>> >>>> -size_t consoled_guest_tx(char c) { return 0; } >>>> +static inline size_t consoled_guest_tx(char c) { return 0; } >>> >>> Why inline? We do so in headers, but we generally avoid "inline" in >>> .c files. >> >> Yes. The file modified is in fact an header. > > Hmm, how did I not pay attention? Yet then a different question arises: > Without the "static inline" I'd expect this to result in a build error > from any two .c files including this header. Yet we aren't aware of > such a build issue, so I wonder whether the stub is needed in the first > place. > > Jan This is a good observation. Right now I see only one caller, that is conditioned on both CONFIG_X86 and pv_shim and pv_console, making this stub unused as far as I can tell. It might indeed be a good idea to drop it. -- Nicola Vetrini, BSc Software Engineer, BUGSENG srl (https://bugseng.com)