From nobody Thu May 16 18:13:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1699353251885615.5555850436491; Tue, 7 Nov 2023 02:34:11 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.628727.980503 (Exim 4.92) (envelope-from ) id 1r0JP9-00050n-Gn; Tue, 07 Nov 2023 10:33:55 +0000 Received: by outflank-mailman (output) from mailman id 628727.980503; Tue, 07 Nov 2023 10:33:55 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r0JP9-00050g-Dg; Tue, 07 Nov 2023 10:33:55 +0000 Received: by outflank-mailman (input) for mailman id 628727; Tue, 07 Nov 2023 10:33:53 +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 1r0JP7-0004jI-M9 for xen-devel@lists.xenproject.org; Tue, 07 Nov 2023 10:33:53 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 24894e44-7d59-11ee-9b0e-b553b5be7939; Tue, 07 Nov 2023 11:33:51 +0100 (CET) Received: from nico.bugseng.com (unknown [147.123.100.131]) by support.bugseng.com (Postfix) with ESMTPSA id 18D2C4EE0C88; Tue, 7 Nov 2023 11:33:49 +0100 (CET) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 24894e44-7d59-11ee-9b0e-b553b5be7939 From: Nicola Vetrini To: xen-devel@lists.xenproject.org Cc: sstabellini@kernel.org, michal.orzel@amd.com, xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com, consulting@bugseng.com, jbeulich@suse.com, andrew.cooper3@citrix.com, roger.pau@citrix.com, Nicola Vetrini , George Dunlap , Julien Grall , Wei Liu Subject: [RFC PATCH 1/4] xen/vsprintf: replace backwards jump with loop Date: Tue, 7 Nov 2023 11:33:42 +0100 Message-Id: <9fbc2bcfa1ee019a8ac1cd1a3d29c38b59b8edff.1699295113.git.nicola.vetrini@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1699353253273100003 Content-Type: text/plain; charset="utf-8" The backwards goto in the vsnprintf function can be replaced with a loop, thereby fixing a violation of MISRA C:2012 Rule 15.2. Signed-off-by: Nicola Vetrini --- xen/common/vsprintf.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/xen/common/vsprintf.c b/xen/common/vsprintf.c index c49631c0a4d8..603bae44177a 100644 --- a/xen/common/vsprintf.c +++ b/xen/common/vsprintf.c @@ -495,6 +495,8 @@ int vsnprintf(char *buf, size_t size, const char *fmt, = va_list args) } =20 for (; *fmt ; ++fmt) { + bool repeat =3D true; + if (*fmt !=3D '%') { if (str < end) *str =3D *fmt; @@ -504,14 +506,16 @@ int vsnprintf(char *buf, size_t size, const char *fmt= , va_list args) =20 /* process flags */ flags =3D 0; - repeat: - ++fmt; /* this also skips first '%' */ - switch (*fmt) { - case '-': flags |=3D LEFT; goto repeat; - case '+': flags |=3D PLUS; goto repeat; - case ' ': flags |=3D SPACE; goto repeat; - case '#': flags |=3D SPECIAL; goto repeat; - case '0': flags |=3D ZEROPAD; goto repeat; + while ( repeat ) { + ++fmt; /* this also skips the first '%' */ + switch (*fmt) { + case '-': flags |=3D LEFT; break; + case '+': flags |=3D PLUS; break; + case ' ': flags |=3D SPACE; break; + case '#': flags |=3D SPECIAL; break; + case '0': flags |=3D ZEROPAD; break; + default: repeat =3D false; break; + } } =20 /* get field width */ --=20 2.34.1 From nobody Thu May 16 18:13:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1699353255310925.0005755387888; Tue, 7 Nov 2023 02:34:15 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.628726.980494 (Exim 4.92) (envelope-from ) id 1r0JP8-0004jl-AL; Tue, 07 Nov 2023 10:33:54 +0000 Received: by outflank-mailman (output) from mailman id 628726.980494; Tue, 07 Nov 2023 10:33:54 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r0JP8-0004je-5b; Tue, 07 Nov 2023 10:33:54 +0000 Received: by outflank-mailman (input) for mailman id 628726; Tue, 07 Nov 2023 10:33:53 +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 1r0JP7-0004MO-0a for xen-devel@lists.xenproject.org; Tue, 07 Nov 2023 10:33:53 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 252173f1-7d59-11ee-98da-6d05b1d4d9a1; Tue, 07 Nov 2023 11:33:52 +0100 (CET) Received: from nico.bugseng.com (unknown [147.123.100.131]) by support.bugseng.com (Postfix) with ESMTPSA id 7C6B54EE0C89; Tue, 7 Nov 2023 11:33:51 +0100 (CET) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 252173f1-7d59-11ee-98da-6d05b1d4d9a1 From: Nicola Vetrini To: xen-devel@lists.xenproject.org Cc: sstabellini@kernel.org, michal.orzel@amd.com, xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com, consulting@bugseng.com, jbeulich@suse.com, andrew.cooper3@citrix.com, roger.pau@citrix.com, Nicola Vetrini , Wei Liu Subject: [RFC PATCH 2/4] x86/dom0: make goto jump forward Date: Tue, 7 Nov 2023 11:33:43 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1699353257101100001 Content-Type: text/plain; charset="utf-8" The jump to the label 'parse_error' becomes forward, rather than backward; at the same time, the else branch can be eliminated. This also fixes a violation of MISRA C:2012 Rule 15.2. Signed-off-by: Nicola Vetrini --- xen/arch/x86/dom0_build.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/xen/arch/x86/dom0_build.c b/xen/arch/x86/dom0_build.c index 09fb8b063ae7..f0191dc148a2 100644 --- a/xen/arch/x86/dom0_build.c +++ b/xen/arch/x86/dom0_build.c @@ -439,12 +439,7 @@ static void __init process_dom0_ioports_disable(struct= domain *dom0) { io_from =3D simple_strtoul(t, &u, 16); if ( u =3D=3D t ) - { - parse_error: - printk("Invalid ioport range <%s> " - "in dom0_ioports_disable, skipping\n", t); - continue; - } + goto parse_error; =20 if ( *u =3D=3D '\0' ) io_to =3D io_from; @@ -454,7 +449,12 @@ static void __init process_dom0_ioports_disable(struct= domain *dom0) goto parse_error; =20 if ( (*u !=3D '\0') || (io_to < io_from) || (io_to >=3D 65536) ) - goto parse_error; + { + parse_error: + printk("Invalid ioport range <%s> " + "in dom0_ioports_disable, skipping\n", t); + continue; + } =20 printk("Disabling dom0 access to ioport range %04lx-%04lx\n", io_from, io_to); --=20 2.34.1 From nobody Thu May 16 18:13:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1699353261370451.3028024666562; Tue, 7 Nov 2023 02:34:21 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.628728.980510 (Exim 4.92) (envelope-from ) id 1r0JPA-000585-2N; Tue, 07 Nov 2023 10:33:56 +0000 Received: by outflank-mailman (output) from mailman id 628728.980510; Tue, 07 Nov 2023 10:33:56 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r0JP9-00056K-Sq; Tue, 07 Nov 2023 10:33:55 +0000 Received: by outflank-mailman (input) for mailman id 628728; Tue, 07 Nov 2023 10:33:55 +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 1r0JP8-0004jI-Uu for xen-devel@lists.xenproject.org; Tue, 07 Nov 2023 10:33:54 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 2597cef2-7d59-11ee-9b0e-b553b5be7939; Tue, 07 Nov 2023 11:33:53 +0100 (CET) Received: from nico.bugseng.com (unknown [147.123.100.131]) by support.bugseng.com (Postfix) with ESMTPSA id 626564EE0C8A; Tue, 7 Nov 2023 11:33:52 +0100 (CET) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 2597cef2-7d59-11ee-9b0e-b553b5be7939 From: Nicola Vetrini To: xen-devel@lists.xenproject.org Cc: sstabellini@kernel.org, michal.orzel@amd.com, xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com, consulting@bugseng.com, jbeulich@suse.com, andrew.cooper3@citrix.com, roger.pau@citrix.com, Nicola Vetrini , Julien Grall , Bertrand Marquis , Volodymyr Babchuk Subject: [RFC PATCH 3/4] xen/arm: GICv3: address MISRA C:2012 Rule 15.2 Date: Tue, 7 Nov 2023 11:33:44 +0100 Message-Id: <135227bde7bc41f44e9c3ae264dae8efc71ef8f0.1699295113.git.nicola.vetrini@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1699353263183100001 Content-Type: text/plain; charset="utf-8" The backwards jump due to the "goto retry;" statement can be transformed into a loop, without losing much in terms of readability. Signed-off-by: Stefano Stabellini Signed-off-by: Nicola Vetrini --- This specific patch was provided by Stefano, I just added the commit message. --- xen/arch/arm/gic-v3-its.c | 81 ++++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 39 deletions(-) diff --git a/xen/arch/arm/gic-v3-its.c b/xen/arch/arm/gic-v3-its.c index 8afcd9783bc8..4ba3f869ddf2 100644 --- a/xen/arch/arm/gic-v3-its.c +++ b/xen/arch/arm/gic-v3-its.c @@ -341,6 +341,7 @@ static int its_map_baser(void __iomem *basereg, uint64_= t regc, unsigned int pagesz =3D 2; /* try 64K pages first, then go down. */ unsigned int table_size; void *buffer; + bool retry =3D false; =20 attr =3D GIC_BASER_InnerShareable << GITS_BASER_SHAREABILITY_SHIFT; attr |=3D GIC_BASER_CACHE_SameAsInner << GITS_BASER_OUTER_CACHEABILITY= _SHIFT; @@ -351,55 +352,57 @@ static int its_map_baser(void __iomem *basereg, uint6= 4_t regc, * it back and see what sticks (page size, cacheability and shareabili= ty * attributes), retrying if necessary. */ -retry: - table_size =3D ROUNDUP(nr_items * entry_size, - BIT(BASER_PAGE_BITS(pagesz), UL)); - /* The BASE registers support at most 256 pages. */ - table_size =3D min(table_size, 256U << BASER_PAGE_BITS(pagesz)); + while ( retry ) + { + table_size =3D ROUNDUP(nr_items * entry_size, + BIT(BASER_PAGE_BITS(pagesz), UL)); + /* The BASE registers support at most 256 pages. */ + table_size =3D min(table_size, 256U << BASER_PAGE_BITS(pagesz)); =20 - buffer =3D _xzalloc(table_size, BIT(BASER_PAGE_BITS(pagesz), UL)); - if ( !buffer ) - return -ENOMEM; + buffer =3D _xzalloc(table_size, BIT(BASER_PAGE_BITS(pagesz), UL)); + if ( !buffer ) + return -ENOMEM; =20 - if ( !check_baser_phys_addr(buffer, BASER_PAGE_BITS(pagesz)) ) - { - xfree(buffer); - return -ERANGE; - } + if ( !check_baser_phys_addr(buffer, BASER_PAGE_BITS(pagesz)) ) + { + xfree(buffer); + return -ERANGE; + } =20 - reg =3D attr; - reg |=3D (pagesz << GITS_BASER_PAGE_SIZE_SHIFT); - reg |=3D (table_size >> BASER_PAGE_BITS(pagesz)) - 1; - reg |=3D regc & BASER_RO_MASK; - reg |=3D GITS_VALID_BIT; - reg |=3D encode_baser_phys_addr(virt_to_maddr(buffer), - BASER_PAGE_BITS(pagesz)); + reg =3D attr; + reg |=3D (pagesz << GITS_BASER_PAGE_SIZE_SHIFT); + reg |=3D (table_size >> BASER_PAGE_BITS(pagesz)) - 1; + reg |=3D regc & BASER_RO_MASK; + reg |=3D GITS_VALID_BIT; + reg |=3D encode_baser_phys_addr(virt_to_maddr(buffer), + BASER_PAGE_BITS(pagesz)); =20 - writeq_relaxed(reg, basereg); - regc =3D readq_relaxed(basereg); + writeq_relaxed(reg, basereg); + regc =3D readq_relaxed(basereg); =20 - /* The host didn't like our attributes, just use what it returned. */ - if ( (regc & BASER_ATTR_MASK) !=3D attr ) - { - /* If we can't map it shareable, drop cacheability as well. */ - if ( (regc & GITS_BASER_SHAREABILITY_MASK) =3D=3D GIC_BASER_NonSha= reable ) + /* The host didn't like our attributes, just use what it returned.= */ + if ( (regc & BASER_ATTR_MASK) !=3D attr ) { - regc &=3D ~GITS_BASER_INNER_CACHEABILITY_MASK; - writeq_relaxed(regc, basereg); + /* If we can't map it shareable, drop cacheability as well. */ + if ( (regc & GITS_BASER_SHAREABILITY_MASK) =3D=3D GIC_BASER_No= nShareable ) + { + regc &=3D ~GITS_BASER_INNER_CACHEABILITY_MASK; + writeq_relaxed(regc, basereg); + } + attr =3D regc & BASER_ATTR_MASK; } - attr =3D regc & BASER_ATTR_MASK; - } - if ( (regc & GITS_BASER_INNER_CACHEABILITY_MASK) <=3D GIC_BASER_CACHE_= nC ) - clean_and_invalidate_dcache_va_range(buffer, table_size); + if ( (regc & GITS_BASER_INNER_CACHEABILITY_MASK) <=3D GIC_BASER_CA= CHE_nC ) + clean_and_invalidate_dcache_va_range(buffer, table_size); =20 - /* If the host accepted our page size, we are done. */ - if ( ((regc >> GITS_BASER_PAGE_SIZE_SHIFT) & 0x3UL) =3D=3D pagesz ) - return 0; + /* If the host accepted our page size, we are done. */ + if ( ((regc >> GITS_BASER_PAGE_SIZE_SHIFT) & 0x3UL) =3D=3D pagesz ) + return 0; =20 - xfree(buffer); + xfree(buffer); =20 - if ( pagesz-- > 0 ) - goto retry; + if ( pagesz-- > 0 ) + retry =3D true; + } =20 /* None of the page sizes was accepted, give up */ return -EINVAL; --=20 2.34.1 From nobody Thu May 16 18:13:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 169935325900031.534301914503203; Tue, 7 Nov 2023 02:34:19 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.628729.980523 (Exim 4.92) (envelope-from ) id 1r0JPB-0005WK-97; Tue, 07 Nov 2023 10:33:57 +0000 Received: by outflank-mailman (output) from mailman id 628729.980523; Tue, 07 Nov 2023 10:33:57 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r0JPB-0005VF-5j; Tue, 07 Nov 2023 10:33:57 +0000 Received: by outflank-mailman (input) for mailman id 628729; Tue, 07 Nov 2023 10:33:55 +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 1r0JP9-0004jI-OS for xen-devel@lists.xenproject.org; Tue, 07 Nov 2023 10:33:55 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 261a6309-7d59-11ee-9b0e-b553b5be7939; Tue, 07 Nov 2023 11:33:54 +0100 (CET) Received: from nico.bugseng.com (unknown [147.123.100.131]) by support.bugseng.com (Postfix) with ESMTPSA id 33A8F4EE0C8B; Tue, 7 Nov 2023 11:33:53 +0100 (CET) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 261a6309-7d59-11ee-9b0e-b553b5be7939 From: Nicola Vetrini To: xen-devel@lists.xenproject.org Cc: sstabellini@kernel.org, michal.orzel@amd.com, xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com, consulting@bugseng.com, jbeulich@suse.com, andrew.cooper3@citrix.com, roger.pau@citrix.com, Nicola Vetrini , Simone Ballarin , Doug Goldstein , George Dunlap , Julien Grall , Wei Liu Subject: [RFC PATCH 4/4] automation/eclair: add deviation for certain backwards goto Date: Tue, 7 Nov 2023 11:33:45 +0100 Message-Id: <306ca49d5d63ea0614bbcef470efec9234d1a018.1699295113.git.nicola.vetrini@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1699353261123100001 Content-Type: text/plain; charset="utf-8" As explained in the deviation record, code constructs such as "goto retry" and "goto again" are sometimes the best balance between code complexity and the understandability of the control flow by developers; as such, these construct are allowed to deviate from Rule 15.2. Signed-off-by: Nicola Vetrini --- automation/eclair_analysis/ECLAIR/deviations.ecl | 10 ++++++++++ docs/misra/deviations.rst | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/= eclair_analysis/ECLAIR/deviations.ecl index fa56e5c00a27..8b1f622f8f82 100644 --- a/automation/eclair_analysis/ECLAIR/deviations.ecl +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl @@ -270,6 +270,16 @@ statements are deliberate" -config=3DMC3R1.R14.3,statements=3D{deliberate , "wrapped(any(),node(if_st= mt))" } -doc_end =20 +# +# Series 15 +# + +-doc_begin=3D"The additional complexity introduced in the code by using co= ntrol flow structures other than backwards goto-s +were deemed not to justify the possible prevention of developer confusion,= given the very torough review process estabilished +in the community." +-config=3DMC3R1.R15.2,reports+=3D{deliberate, "any_area(any_loc(text(^.*go= to (again|retry).*$)))"} +-doc_end + # # Series 20. # diff --git a/docs/misra/deviations.rst b/docs/misra/deviations.rst index 8511a189253b..7d1e1f0d09b3 100644 --- a/docs/misra/deviations.rst +++ b/docs/misra/deviations.rst @@ -208,6 +208,16 @@ Deviations related to MISRA C:2012 Rules: statements are deliberate. - Project-wide deviation; tagged as `disapplied` for ECLAIR. =20 + * - R15.2 + - The possible prevention of developer confusion as a result of using + control flow structures other than backwards goto-s in some instanc= es was + deemed not strong enough to justify the additional complexity intro= duced + in the code. Such instances are the uses of the following labels: + =20 + - again + - retry + - Tagged as `deliberate` for ECLAIR. + * - R20.7 - Code violating Rule 20.7 is safe when macro parameters are used: (1) as function arguments; --=20 2.34.1