From patchwork Fri Dec 8 00:18:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 13484495 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 33220C4167B for ; Fri, 8 Dec 2023 00:18:33 +0000 (UTC) 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 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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 Signed-off-by: Stefano Stabellini Acked-by: Julien Grall diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index 2b570af0e0..7cb9544a96 100644 --- 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. + * - `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. + * - `Rule 16.7 `_ - Required - A switch-expression shall not have essentially Boolean type