[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [XEN PATCH][for-4.19 v2 6/7] xen/console: make function static inline
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
- Date: Tue, 17 Oct 2023 18:36:18 +0200
- Cc: sstabellini@xxxxxxxxxx, michal.orzel@xxxxxxx, xenia.ragiadakou@xxxxxxx, ayan.kumar.halder@xxxxxxx, consulting@xxxxxxxxxxx, andrew.cooper3@xxxxxxxxxx, roger.pau@xxxxxxxxxx, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Tue, 17 Oct 2023 16:36:26 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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)
|