From nobody Sun May 19 07:31:54 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=1701994716; cv=none; d=zohomail.com; s=zohoarc; b=S1jgRlJzbZxf209UF0xwoldcDjiQUjJkIt4Kxdru4uESotHQMfVkAi1+gci4A8dRy4lPZQGH2g2+lHCCOXN/vcECH5m+PKq31cFx355FKfHEDofdE8wc4SXhr1doqwMQ5HqcKOy2YJYhEaPUWiDBuX0PV9Ey+TiaVPvOwvGlrEU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701994716; 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=95YPrS7HoWcCiC9QGsTE7qz9q0jRQ4H5tdGoAsx5lwc=; b=HKdYH1xP+zmKFHb5ZQkUudqchR+mxcjr8wuPobFBzFll4nF4uPbqConByRvAne9WW5uBt8MDsttUuSbOPb5Kgk7rLqQUOnAOW9Wf6tpcEdrF0cOp20fizrECWH3iHrfAQmKqqQmDhB/QoTn835QhiAS7R1BbKkiGyYE76rXwIAU= 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 1701994716889389.73088512999163; Thu, 7 Dec 2023 16:18:36 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.650266.1015593 (Exim 4.92) (envelope-from ) id 1rBOZD-0003Bj-KM; Fri, 08 Dec 2023 00:18:07 +0000 Received: by outflank-mailman (output) from mailman id 650266.1015593; Fri, 08 Dec 2023 00:18:07 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rBOZD-0003Bc-Gz; Fri, 08 Dec 2023 00:18:07 +0000 Received: by outflank-mailman (input) for mailman id 650266; Fri, 08 Dec 2023 00:18:06 +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 1rBOZC-0003BW-5S for xen-devel@lists.xenproject.org; Fri, 08 Dec 2023 00:18:06 +0000 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 410e1e7f-955f-11ee-9b0f-b553b5be7939; Fri, 08 Dec 2023 01:18:04 +0100 (CET) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id BE0B9B82A3A; Fri, 8 Dec 2023 00:18:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D15C0C433C7; Fri, 8 Dec 2023 00:18:01 +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: 410e1e7f-955f-11ee-9b0f-b553b5be7939 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701994683; bh=8m8gThuAFHN6+EhkQGQNFfzdMqA2bZ0WaP37wrRXwmc=; h=Date:From:To:cc:Subject:From; b=l8uW8Gkg9516QydKURE7B9KPez+mx1dXBeN0a9EDbyT4yjjuDd7jRVBRn85TA6wD4 8KQjeSrCiZFzmRmxYmPbYYzcEStEdSSJrzRuqW77W2Lsq6Cx50Py2F1Cxzk8TAYkle QmtXKD7F986iyy+xgaE+Xt4/tXHkuE1O0q8Xc33fSJJegWIwd8vm6LSobknMiqlidt xtjYSJJNZFDebFHhe/Kt5CKCXYb8TO2bRKKaQ+P5CtPS0wBrQEMFYuR24dKCo0v0rO xF9wkI7lm5QhQRrFkH5WRX/tc9tZnd9BG62kgnB6WQARJX3MPQAdUVsv7MB6ky+irv E5FaMxiOCyyFg== Date: Thu, 7 Dec 2023 16:18:00 -0800 (PST) From: Stefano Stabellini X-X-Sender: sstabellini@ubuntu-linux-20-04-desktop To: xen-devel@lists.xenproject.org cc: andrew.cooper3@citrix.com, jbeulich@suse.com, george.dunlap@citrix.com, julien@xen.org, sstabellini@kernel.org, bertrand.marquis@arm.com, roger.pau@citrix.com, roberto.bagnara@bugseng.com, federico.serafini@bugseng.com Subject: [PATCH] docs/misra/rules.rst: add Rule 16.2 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: 1701994717946100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Signed-off-by: Stefano Stabellini diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index 2b570af0e0..7cb9544a96 100644 Acked-by: Julien Grall --- a/docs/misra/rules.rst +++ b/docs/misra/rules.rst @@ -469,6 +469,15 @@ maintainers if you want to suggest a change. - In addition to break, also other flow control statements such as continue, return, goto 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 + - The x86 emulator (xen/arch/x86/x86_emulate*) is exempt from + compliance with this rule. Efforts to make the x86 emulator + adhere to Rule 16.2 would result in increased complexity and + maintenance difficulty, and could potentially introduce bugs.=20 + * - `Rule 16.7 `_ - Required - A switch-expression shall not have essentially Boolean type