From nobody Sat Sep 21 03:16:45 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; dkim=pass; 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; dmarc=pass(p=none dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1700003595; cv=none; d=zohomail.com; s=zohoarc; b=ehqku/iMt52lj+7rpdrPkG2B/cvntPvrXKFeQWIRKXDO+H8VWle+LqHQmlrc0ozvv2IqSB2z9hoarJ3WQFMxGyye4+VWyB7XuLcJWtadKa8cv3/n7cHLXOU8X3TsKZFL81S0+yp08W+OVEmADyVeRtqHNf0ZPNifeQi2MtYAMuo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1700003595; h=Content-Type:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=oEt4tOoflFFcmHDswDjgdkSNEuNIMSkIiCecAtger1E=; b=lrjwy5hUbLDgQoULn+L/2fd2y8ObqUsSvw3E52ti6JAZ6oz0yPjx/TaEegdVEF3sC3WKW+0bZm2uV+5PctOkHF80ZV9u4+IUqleXqg0OMSi+vzmgsJyAlLD+uABFrmHM3/n6YWPbyRb1MlhUVwpOTsH8VjYjvqRtjz3X0Kbf72g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1700003595415289.151679128094; Tue, 14 Nov 2023 15:13:15 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.633383.988138 (Exim 4.92) (envelope-from ) id 1r32aY-000287-V8; Tue, 14 Nov 2023 23:12:58 +0000 Received: by outflank-mailman (output) from mailman id 633383.988138; Tue, 14 Nov 2023 23:12:58 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r32aY-000280-Sc; Tue, 14 Nov 2023 23:12:58 +0000 Received: by outflank-mailman (input) for mailman id 633383; Tue, 14 Nov 2023 23:12:57 +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 1r32aX-00027m-Mg for xen-devel@lists.xenproject.org; Tue, 14 Nov 2023 23:12:57 +0000 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 575ea215-8343-11ee-9b0e-b553b5be7939; Wed, 15 Nov 2023 00:12:55 +0100 (CET) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id E8977614C6; Tue, 14 Nov 2023 23:12:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6B2A5C433C7; Tue, 14 Nov 2023 23:12:52 +0000 (UTC) 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: 575ea215-8343-11ee-9b0e-b553b5be7939 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700003573; bh=MJwqOLCXiv/cq1mpQ9LZbnoB6FsQ1T2+CZlcPq8MhOA=; h=Date:From:To:cc:Subject:From; b=tIA1ui5lo8Hh0xixkI2OXSiiRtxhRzzs8gEUvra3XP3maw1yzWJsSS8IvbpG19Uyw xVThMxuKJOVs6z8LUjk4oem4H4kaxKZ+qfkbfMnQnZSl9f0QCIuXU6CqBWAToesfiG fMKKWAbK0ym8FEWprL+SSVLSCF4qqRBOqOGF0uvZ8NYQr1ByYMs9I7Fvxs36ADGnAt x5Q4Al3Nec1/RD6OIwyKesq+bzaoBmWGGG8dS9c2bLbDEVb/bvoFkhliueMlWrZa1A J6sWG/YYNnT/qbqu465nj16DCRT+78dhfQtC3ufaOwNqVy6Q5PHf/k3Cl4vJTykzkS ndp4VUeUxwy0Q== Date: Tue, 14 Nov 2023 15:12:51 -0800 (PST) From: Stefano Stabellini X-X-Sender: sstabellini@ubuntu-linux-20-04-desktop To: xen-devel@lists.xenproject.org cc: sstabellini@kernel.org, Jan Beulich , Andrew Cooper , =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= , Bertrand Marquis , Julien Grall Subject: [PATCH] docs/misra: add R16.2 and R16.3 Message-ID: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 X-ZohoMail-DKIM: pass (identity @kernel.org) X-ZM-MESSAGEID: 1700003596978100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" For Rule 16.2 deviate xen/arch/x86/x86_emulate. For Rule 16.2 allow control flow statements and terminals. For the rest, request the "fallthrough" psedo-keyword to be used. Signed-off-by: Stefano Stabellini --- docs/misra/rules.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index 375a886607..926ecc9d82 100644 --- a/docs/misra/rules.rst +++ b/docs/misra/rules.rst @@ -462,6 +462,20 @@ maintainers if you want to suggest a change. =20 while(0) and while(1) and alike are allowed. =20 + * - `Rule 16.2 `_ + - Required + - A switch label shall only be used when the most closely-enclosing + compound statement is the body of a switch statement + - xen/arch/x86/x86_emulate/ doesn't follow this guideline + + * - `Rule 16.3 `_ + - Required + - An unconditional break statement shall terminate every + switch-clause + - Control flow statements (goto, return, continue) and terminals + (BUG()) are permitted. Other cases shall have the pseudo-keyword + "fallthrough". + * - `Rule 16.7 `_ - Required - A switch-expression shall not have essentially Boolean type --=20 2.25.1