From patchwork Tue Jul 5 21:02:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xenia Ragiadakou X-Patchwork-Id: 12907055 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 41CE6C43334 for ; Tue, 5 Jul 2022 21:02:50 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.361535.591093 (Exim 4.92) (envelope-from ) id 1o8pgg-0003qi-6Q; Tue, 05 Jul 2022 21:02:26 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 361535.591093; Tue, 05 Jul 2022 21:02:26 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o8pgg-0003qa-3H; Tue, 05 Jul 2022 21:02:26 +0000 Received: by outflank-mailman (input) for mailman id 361535; Tue, 05 Jul 2022 21:02:24 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o8pge-0003b1-IA for xen-devel@lists.xenproject.org; Tue, 05 Jul 2022 21:02:24 +0000 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [2a00:1450:4864:20::42a]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id c427c8de-fca5-11ec-bd2d-47488cf2e6aa; Tue, 05 Jul 2022 23:02:23 +0200 (CEST) Received: by mail-wr1-x42a.google.com with SMTP id cl1so19261074wrb.4 for ; Tue, 05 Jul 2022 14:02:23 -0700 (PDT) Received: from uni.. (adsl-146.37.6.170.tellas.gr. [37.6.170.146]) by smtp.googlemail.com with ESMTPSA id l26-20020a1ced1a000000b003a03ae64f57sm2897401wmh.8.2022.07.05.14.02.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jul 2022 14:02:22 -0700 (PDT) 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: c427c8de-fca5-11ec-bd2d-47488cf2e6aa DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AQT9Zg3S1V+SLzJ9mIrWY3ddQbg0abcQqmYDqdswck8=; b=AFccQjNrQmfDG4VaWaef4xE8J6saJ7xJQU2+GqZgfhh3f4xKHvoOcergdPc8v6EZHB W8PpgIETewLVrLtE8R9SgobXUK/+twapNT7rfOAAy8o4KG1q9tilbcZ0O5lpDnjfffkm wpGNB4Co6W2b6dHDkhfv8qn6WvH6EmfRxh01kBX/nvQyCXNt2jwTye2XekvYS48NH1Gj XsVm+ZjelZR5VC4Cuxmm5CsT/9OLLqJRlX6jvF5n/TPuyRiQ3Wt878V/IACErpUdPda+ uQB4YXgo5oRIcn1dJoWBZOcOM0Amy/UkcShxImHmtnp49oxqJXh85b0T43VICgbLUSMs +wtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AQT9Zg3S1V+SLzJ9mIrWY3ddQbg0abcQqmYDqdswck8=; b=gttK81RYvI/aXKZNBVphCbKabgnQRFPxCCoLzGrfCyekcIjqDRFTjrGVNt6YYD77rf tPrkBXKjfrSQsXAwsAgNiHIE2eMnSyjwpVN4iY20gp2jC6DOHpxnMTl6SpWODVCiA3Jr MMe+ri8a6PbYCOgflZaTJJfUrtaq7qwsfp42/Eg9DBLHyEfOVCiFwK+cOChPyA1srq4K E3webX8slzDOBNzY7q4ZoC4VcPOETU8IyVES6G2N9/p82hegJO2blUYWITTssZQ6j+Gu i4cH7p5fpY+tSuCRzSmp00QGB5XtyVCHFOjaAsZfOLUFIA2nFxc5emPb0hKK4GAOsz8r QF2Q== X-Gm-Message-State: AJIora9sev63NwgQqd8MyW/UfIBU5AsfOFTMHhCYHhGVvpx4AKU3Ef4M /zZWq7uwrP82ySSVS8MzULnDCo4Ibe8= X-Google-Smtp-Source: AGRyM1uPOb9BIMjvnqYCviSjSCmTkegKo3dPghVnCPYleuQuvV702Na9iW7j4NSzdmepl3cQRLxReQ== X-Received: by 2002:a5d:64c3:0:b0:21d:720c:4ade with SMTP id f3-20020a5d64c3000000b0021d720c4ademr5695443wri.570.1657054942891; Tue, 05 Jul 2022 14:02:22 -0700 (PDT) From: Xenia Ragiadakou To: xen-devel@lists.xenproject.org Cc: Stefano Stabellini , Julien Grall , Bertrand Marquis , Volodymyr Babchuk Subject: [PATCH 1/4] xen/arm: traps: Fix MISRA C 2012 Rule 8.4 violations Date: Wed, 6 Jul 2022 00:02:15 +0300 Message-Id: <20220705210218.483854-2-burzalodowa@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220705210218.483854-1-burzalodowa@gmail.com> References: <20220705210218.483854-1-burzalodowa@gmail.com> MIME-Version: 1.0 Add the function prototypes of the functions below in header file so that they are visible before the function definitions in traps.c. enter_hypervisor_from_guest_preirq() enter_hypervisor_from_guest() do_trap_hyp_sync() do_trap_guest_sync() do_trap_irq() do_trap_fiq() leave_hypervisor_to_guest() Signed-off-by: Xenia Ragiadakou --- xen/arch/arm/include/asm/processor.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/xen/arch/arm/include/asm/processor.h b/xen/arch/arm/include/asm/processor.h index c021160412..74cc07028f 100644 --- a/xen/arch/arm/include/asm/processor.h +++ b/xen/arch/arm/include/asm/processor.h @@ -576,10 +576,24 @@ void vcpu_regs_hyp_to_user(const struct vcpu *vcpu, void vcpu_regs_user_to_hyp(struct vcpu *vcpu, const struct vcpu_guest_core_regs *regs); +void enter_hypervisor_from_guest_preirq(void); + +void enter_hypervisor_from_guest(void); + +void do_trap_hyp_sync(struct cpu_user_regs *regs); + +void do_trap_guest_sync(struct cpu_user_regs *regs); + void do_trap_hyp_serror(struct cpu_user_regs *regs); void do_trap_guest_serror(struct cpu_user_regs *regs); +void do_trap_irq(struct cpu_user_regs *regs); + +void do_trap_fiq(struct cpu_user_regs *regs); + +void leave_hypervisor_to_guest(void); + register_t get_default_hcr_flags(void); /* From patchwork Tue Jul 5 21:02:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xenia Ragiadakou X-Patchwork-Id: 12907053 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 59AA9CCA47B for ; Tue, 5 Jul 2022 21:02:49 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.361536.591104 (Exim 4.92) (envelope-from ) id 1o8pgh-00046F-HJ; Tue, 05 Jul 2022 21:02:27 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 361536.591104; Tue, 05 Jul 2022 21:02:27 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o8pgh-000468-DO; Tue, 05 Jul 2022 21:02:27 +0000 Received: by outflank-mailman (input) for mailman id 361536; Tue, 05 Jul 2022 21:02:26 +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 1o8pgf-0003lq-Ul for xen-devel@lists.xenproject.org; Tue, 05 Jul 2022 21:02:25 +0000 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [2a00:1450:4864:20::431]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id c524462e-fca5-11ec-924f-1f966e50362f; Tue, 05 Jul 2022 23:02:25 +0200 (CEST) Received: by mail-wr1-x431.google.com with SMTP id s1so19237088wra.9 for ; Tue, 05 Jul 2022 14:02:25 -0700 (PDT) Received: from uni.. (adsl-146.37.6.170.tellas.gr. [37.6.170.146]) by smtp.googlemail.com with ESMTPSA id l26-20020a1ced1a000000b003a03ae64f57sm2897401wmh.8.2022.07.05.14.02.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jul 2022 14:02:24 -0700 (PDT) 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: c524462e-fca5-11ec-924f-1f966e50362f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2dN0B8zmPwKiHY8p7Il+e7JbeI1aQAoit1LVTiMKcLU=; b=qTK4Va1hmn9ohnH4FMyIgYbT7056l29OKtk+X4/QlVnhHjUkDqKah6paQRdHzk01hu 0Dvb7Dq05GxhI/Hrr1HdpWnI1MhLWUgG42yWxUdsr0/+g6HZT3YoBccC0SuptxpvMVlr WGqsAyNkzARye3oH/Pky/YiP2pLn1szcYcVOqg5IhjVLdq1U2RF9fbi6YXjboCRJplGK l9SVDrufSnsBflrB8ksbZ4uDi1edSIaIx4cE2LHwuw+3zz+3S3sh4Mgjk8gKDWUNTk/Y B6NsnS82u/GJEa3k2d+3zVWf1ACtq0pgwn24GddnKUZ6QkEgV4TBIDqVnLcTGkMCh0IU Peew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2dN0B8zmPwKiHY8p7Il+e7JbeI1aQAoit1LVTiMKcLU=; b=3FMh+dlUbliDnRfkWJQe2kSpU1EVDh0PO3HJOAWFn65A3WkUEa8MThZLvSzq+LjbZQ N71HT67EWa0eHNucMxUQNUEYgxI0JTPqLLAH4EmxZvFaaI1dBOz5nNlv+UQf3AnRJWZl FQC8Rsh5wwHtDynJMF+CFmN8+mhyjxTo8xuUuzjNJSaRyvV7cbGYhFbyA1oD6vE5BFUK 3b+obclT6HRZjf1uWNcLpT2Fh1bVWSFTJocnJOMvCup2cutL/a8T+30aEiFsrX9gSH1h gpUwdcMBXvGFMfnSssJP7El1iyQlmhI/E3bPKzP6pXn6WRtSRV6Quf6OzTzBmgN8nkBp uWng== X-Gm-Message-State: AJIora/wf4+cjAKbeW6txiUOdskmj7hGu2viTZJQNb+vxlSY2gyn4lG4 ObOGEIQsBjoGi3Shrf/2enaCp9hyYnw= X-Google-Smtp-Source: AGRyM1sP9RfOibNcXJdbvksizclgfrXbx73MiR//wCf/Pc9eWTz6chQXRh308WzUU+ea4PDMr+g9pg== X-Received: by 2002:a5d:5908:0:b0:21d:6e91:9f3 with SMTP id v8-20020a5d5908000000b0021d6e9109f3mr7917149wrd.52.1657054944466; Tue, 05 Jul 2022 14:02:24 -0700 (PDT) From: Xenia Ragiadakou To: xen-devel@lists.xenproject.org Cc: Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [PATCH 2/4] xen/common: time: Fix MISRA C 2012 Rule 8.7 violation Date: Wed, 6 Jul 2022 00:02:16 +0300 Message-Id: <20220705210218.483854-3-burzalodowa@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220705210218.483854-1-burzalodowa@gmail.com> References: <20220705210218.483854-1-burzalodowa@gmail.com> MIME-Version: 1.0 The variable __mon_lengths is referenced only in time.c. Change its linkage from external to internal by adding the storage-class specifier static to its definitions. Also, this patch resolves indirectly a MISRA C 2012 Rule 8.4 violation warning. Signed-off-by: Xenia Ragiadakou Acked-by: Julien Grall --- xen/common/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/common/time.c b/xen/common/time.c index 22379f4ae2..92f7b72464 100644 --- a/xen/common/time.c +++ b/xen/common/time.c @@ -28,7 +28,7 @@ ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) /* How many days are in each month. */ -const unsigned short int __mon_lengths[2][12] = { +static const unsigned short int __mon_lengths[2][12] = { /* Normal years. */ {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}, /* Leap years. */ From patchwork Tue Jul 5 21:02:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xenia Ragiadakou X-Patchwork-Id: 12907052 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 1D801C433EF for ; Tue, 5 Jul 2022 21:02:49 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.361537.591114 (Exim 4.92) (envelope-from ) id 1o8pgi-0004M9-NJ; Tue, 05 Jul 2022 21:02:28 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 361537.591114; Tue, 05 Jul 2022 21:02:28 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o8pgi-0004Ly-KT; Tue, 05 Jul 2022 21:02:28 +0000 Received: by outflank-mailman (input) for mailman id 361537; Tue, 05 Jul 2022 21:02:27 +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 1o8pgh-0003lq-5Z for xen-devel@lists.xenproject.org; Tue, 05 Jul 2022 21:02:27 +0000 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [2a00:1450:4864:20::429]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id c602b98c-fca5-11ec-924f-1f966e50362f; Tue, 05 Jul 2022 23:02:26 +0200 (CEST) Received: by mail-wr1-x429.google.com with SMTP id bk26so4174893wrb.11 for ; Tue, 05 Jul 2022 14:02:26 -0700 (PDT) Received: from uni.. (adsl-146.37.6.170.tellas.gr. [37.6.170.146]) by smtp.googlemail.com with ESMTPSA id l26-20020a1ced1a000000b003a03ae64f57sm2897401wmh.8.2022.07.05.14.02.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jul 2022 14:02:25 -0700 (PDT) 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: c602b98c-fca5-11ec-924f-1f966e50362f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=u5CyUBshkwHYJe1DDZsq4HHBEadXEMKhCxZMzLCqLMY=; b=pI2j9/zHI21aJwS6t7AiKATAAuYp1jk4Y+8d8r/utSvmIN7Y63+dzeczux93fegJPl 0+Qgod/t4+J8ZoxHjjIMsmV9tV0Dswt3i/1sDsp5ywUUdC+kLbdMrDDmDOTEo4rpaSR0 rCZeElbSpHPi6ekBqc76afDvdrv1Pcq8vekyIp6hnn9mAywGw1Eb+uRoZv8OLZkNFjsR X5Qsps539A6OpdMMyjjktnlX2WG4iHg+xZRS6S5DIcLEN1BaIoRNQnh1dHS8/KBcyWm0 NTAo4PFy259xmcVkq31SaqQ8o1M4czuGxVMlE+rA/IYky+s03cgQ7AM8MU4ylSYQhbNG WToQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=u5CyUBshkwHYJe1DDZsq4HHBEadXEMKhCxZMzLCqLMY=; b=s/i3L2EDuiKbPkO8Isg/xO6Q30Z9TIG1Ov4+NZRvYVbMmtxMY1wwGXCbB2ybiKLr8d W6LtA+PFx5N2CfD5R+3nTOtHrtKDgTaDsW9VVjFBkT/AyL38adHb1YUzv9OQYsVdnn8A +6770YqKzCAct8eUc1O+mMettQk/75HxIax6ssq7JnwzRcJWdJY0yqlYB0yAwN9eqIVa fJQ2Q4Kjblg34YHCDBjjneBMEZcoFs/SsGUN0qe7aG31MQQQI81XXizXaHpeA/eWEknm DMiFGQsY1kiRUUuO1Ca7iNRbMol+9C11IE4YHQKe5ymoFOJskz+ihY0amA7LSFR7MT4s aQrw== X-Gm-Message-State: AJIora8oMQ8siEXFXYiuJ146lTGDvwhaV8zQ8bflm/0xSysgAFGiB8JI xEjN8f/enQVnH7JXvuOJlqnWEQMW0Gw= X-Google-Smtp-Source: AGRyM1vet7biqpwvDs2fcDYUpJlzinBxtCC41x/DTfpg0WwqZhHmqlBMN/URFYIMTZX8CnXvUU795g== X-Received: by 2002:a5d:6da8:0:b0:21d:2598:4e28 with SMTP id u8-20020a5d6da8000000b0021d25984e28mr35759389wrs.373.1657054945791; Tue, 05 Jul 2022 14:02:25 -0700 (PDT) From: Xenia Ragiadakou To: xen-devel@lists.xenproject.org Cc: Stefano Stabellini , Julien Grall , Bertrand Marquis , Volodymyr Babchuk Subject: [PATCH 3/4] xen/arm: domain: Fix MISRA C 2012 Rule 8.7 violation Date: Wed, 6 Jul 2022 00:02:17 +0300 Message-Id: <20220705210218.483854-4-burzalodowa@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220705210218.483854-1-burzalodowa@gmail.com> References: <20220705210218.483854-1-burzalodowa@gmail.com> MIME-Version: 1.0 The function idle_loop() is referenced only in domain.c. Change its linkage from external to internal by adding the storage-class specifier static to its definitions. Since idle_loop() is referenced only in inline assembly, add the 'used' attribute to suppress unused-function compiler warning. Also, this patch resolves indirectly a MISRA C 2012 Rule 8.4 violation warning. Signed-off-by: Xenia Ragiadakou Acked-by: Julien Grall --- xen/arch/arm/domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c index 2f8eaab7b5..2fa67266d0 100644 --- a/xen/arch/arm/domain.c +++ b/xen/arch/arm/domain.c @@ -63,7 +63,7 @@ static void do_idle(void) rcu_idle_exit(cpu); } -void idle_loop(void) +static __used void idle_loop(void) { unsigned int cpu = smp_processor_id(); From patchwork Tue Jul 5 21:02:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xenia Ragiadakou X-Patchwork-Id: 12907051 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 03041C43334 for ; Tue, 5 Jul 2022 21:02:47 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.361538.591126 (Exim 4.92) (envelope-from ) id 1o8pgj-0004cx-WF; Tue, 05 Jul 2022 21:02:30 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 361538.591126; Tue, 05 Jul 2022 21:02:29 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o8pgj-0004bp-S0; Tue, 05 Jul 2022 21:02:29 +0000 Received: by outflank-mailman (input) for mailman id 361538; Tue, 05 Jul 2022 21:02:28 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o8pgi-0003b1-Ob for xen-devel@lists.xenproject.org; Tue, 05 Jul 2022 21:02:28 +0000 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [2a00:1450:4864:20::329]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id c6cbaf4e-fca5-11ec-bd2d-47488cf2e6aa; Tue, 05 Jul 2022 23:02:28 +0200 (CEST) Received: by mail-wm1-x329.google.com with SMTP id bi22-20020a05600c3d9600b003a04de22ab6so7947890wmb.1 for ; Tue, 05 Jul 2022 14:02:28 -0700 (PDT) Received: from uni.. (adsl-146.37.6.170.tellas.gr. [37.6.170.146]) by smtp.googlemail.com with ESMTPSA id l26-20020a1ced1a000000b003a03ae64f57sm2897401wmh.8.2022.07.05.14.02.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jul 2022 14:02:26 -0700 (PDT) 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: c6cbaf4e-fca5-11ec-bd2d-47488cf2e6aa DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HkaVC8qOCJ3UPIdTEyzMpTlDCcABnjbSgrgYQldov+o=; b=cOLxgFWU8N514uleMGCElsG8ATfStWkMOMl3HupjfmkmLHTtbL1rGUAz7f4c8oxM5g v9ohz2MBgInX8iL0H1AHDZTYDvXxVdzAFYRMrNXR9zq8dI0/KA3mZJ1sPg9lhnL51/Yh 0r+s4UDih+Spb0ZnWvlMH64yJZ0VbtvyWla+RbDVrRUyV07GE3Bp6KC97QlhFTWAySW/ k41g3s3RGzpTNVY6c8kADqsi6MtWCNeoi8nqDB6VZ/J+2XpGnu2QLVphybduZvfy+JDo mlTIMYk9StQXcbQ9/qQEpJM0STKGUvezUj5gC0qZvQKG7GnQ9RjfYwIqzjoW2uOLamz+ 53Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HkaVC8qOCJ3UPIdTEyzMpTlDCcABnjbSgrgYQldov+o=; b=ML3WmNQOeDKQOajrfFpwpwcCI3AvsDYHhmvV71E4wNsgnSSBUia7ia2hHjCzGvS9K6 ics/ypVihjbA1OBRdrelQZc9IbnYuVFz7KBcB789pYB+ObdBXKNut06rb0lDvNK5iyS0 tjKYcew1IfOpdIWBhuo0yFaCP5ZQK1wHuwZlCdqroGkZ/avCS4A3hCcBjoZAB0V4BAhI SZbriTqiaZ8sitdaH/Lr7+V3koCpB63heGCsO5bumDdXuNQPpURix7IlrN7ZzuVjNZp8 plUbfYphGXdde6EsD6hQq50M6+s548+60WCnCz4fZkMdaS7a1xI2UmxMn/hCUPk9QEDd plPw== X-Gm-Message-State: AJIora8NG205kmcliLW5nKKKnphak7e5U1JiEhRtMHj7oW4i/4xZBTWF sY2lBAayAVA03AhPJ8V7YcRTaQu2Y0g= X-Google-Smtp-Source: AGRyM1u2zRzYBC+jrV2YPjoAyboW0KZhHp1AN41tOKejBwQEN9SyFWgw/PxlF8NaValM6teFAW/gfw== X-Received: by 2002:a05:600c:a18d:b0:3a0:2c9a:b3de with SMTP id id13-20020a05600ca18d00b003a02c9ab3demr37965632wmb.147.1657054947271; Tue, 05 Jul 2022 14:02:27 -0700 (PDT) From: Xenia Ragiadakou To: xen-devel@lists.xenproject.org Cc: Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [PATCH 4/4] xen/char: pv_console: Fix MISRA C 2012 Rule 8.4 violation Date: Wed, 6 Jul 2022 00:02:18 +0300 Message-Id: <20220705210218.483854-5-burzalodowa@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220705210218.483854-1-burzalodowa@gmail.com> References: <20220705210218.483854-1-burzalodowa@gmail.com> MIME-Version: 1.0 The function pv_console_evtchn() is defined in the header . If the header happens to be included by multiple files, this can result in linker errors due to multiple definitions, So, it is more appropriate to resolve this MISRA C 2012 Rule 8.4 violation warning by making pv_console_evtchn() inline with internal linkage. Signed-off-by: Xenia Ragiadakou --- xen/include/xen/pv_console.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/include/xen/pv_console.h b/xen/include/xen/pv_console.h index 4745f46f2d..a96a6368b1 100644 --- a/xen/include/xen/pv_console.h +++ b/xen/include/xen/pv_console.h @@ -19,7 +19,7 @@ static inline void pv_console_set_rx_handler(serial_rx_fn fn) { } static inline void pv_console_init_postirq(void) { } static inline void pv_console_puts(const char *buf, size_t nr) { } static inline size_t pv_console_rx(struct cpu_user_regs *regs) { return 0; } -evtchn_port_t pv_console_evtchn(void) +static inline evtchn_port_t pv_console_evtchn(void) { ASSERT_UNREACHABLE(); return 0;