From nobody Sun May 12 17:02:41 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=1701831792; cv=none; d=zohomail.com; s=zohoarc; b=QxF53ceE6dYTxbvyklz+hmcQ1iHZkug/9OFlx3vXJSMDs7ZRhsMKusm+83PFtgb9haslkMJ4/99hNAkDoQxiaBR6Ppo+26BmMDk4CEiQjggn6jik7qY3PibjnstN4gdlYU7dSxbjxODbAi28kS8vLhJa4LGdPBF4urIhvLDTNPA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701831792; 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=0T58iTYT7VjswRK5/8S0f52N2M3mqdC64QDIcC28iXE=; b=bovyUDV5FxGFG/qMgK5VkRlLxpWXsXd7h14wmOwCPYEVt8U55KVx/39Cf5lmJzSIPverjqOhRAmeHoWuV8UkMRKhfP79lF9x5CbB2esvMgVJUCxZDw8ozYLUJvI7DqVXGFkPi1lpNqrH9YRw02f8fJln4k9B89xvhHhf8mQmkZ4= 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 1701831792413252.48672122748485; Tue, 5 Dec 2023 19:03:12 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.648790.1012753 (Exim 4.92) (envelope-from ) id 1rAiBP-0000xF-OY; Wed, 06 Dec 2023 03:02:43 +0000 Received: by outflank-mailman (output) from mailman id 648790.1012753; Wed, 06 Dec 2023 03:02:43 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rAiBP-0000x8-LM; Wed, 06 Dec 2023 03:02:43 +0000 Received: by outflank-mailman (input) for mailman id 648790; Wed, 06 Dec 2023 03:02:42 +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 1rAiBO-0000x2-1d for xen-devel@lists.xenproject.org; Wed, 06 Dec 2023 03:02:42 +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 ea7c9c66-93e3-11ee-9b0f-b553b5be7939; Wed, 06 Dec 2023 04:02:39 +0100 (CET) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id 268EFB818D3; Wed, 6 Dec 2023 03:02:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14CD0C433C7; Wed, 6 Dec 2023 03:02:36 +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: ea7c9c66-93e3-11ee-9b0f-b553b5be7939 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701831758; bh=ntTXqts67fmIhOymiZHUwupfVzExsdvRdWNYbyqGwYw=; h=Date:From:To:cc:Subject:From; b=T7/dDbrwqCFaneV0rUrvqT5HENfaBv83cxvctdeWRM1lbp6cZ26zjNDGB61BrtjaL zcLjakJ7Emu8vTzClqVt+a0Oa5anBisqSUUqlrYNBeEmWv3G2BpChNoCmDmEqKshFg 4K7xRVaBVlRUFqKZBrpiFyFVgWaE/+uNtwP8RLXWj+I5aipRfjcDlgR43rlF6NITSN a1k3QHNO0QGllmOOqeSOJ7tULGGZjKINOGJBnbnqBy4XIXdrVNWxoAt8pmpI4bMILM 2pHeUXFyYv+OXtgdqXAOfl7aWfSscIHU9zKhPfmFjrNEMlq/hBxZSFRMxdq3uEk5Cp JytOTc5TXJZyg== Date: Tue, 5 Dec 2023 19:02:35 -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, bertrannd.marquis@arm.com, roger.pau@citrix.com, roberto.bagnara@bugseng.com, federico.serafini@bugseng.com Subject: [PATCH] docs/misra/rules.rst: add more rules 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: 1701831793610100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add the rules accepted in the last three MISRA C working group meetings. Signed-off-by: Stefano Stabellini diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index 75921b9a34..ab89116a43 100644 --- a/docs/misra/rules.rst +++ b/docs/misra/rules.rst @@ -462,11 +462,23 @@ maintainers if you want to suggest a change. =20 while(0) and while(1) and alike are allowed. =20 + * - `Rule 16.3 `_ + - Required + - An unconditional break statement shall terminate every + switch-clause + - In addition to break, also other flow control statements such as + continue, return, goto are allowed. + * - `Rule 16.7 `_ - Required - A switch-expression shall not have essentially Boolean type - =20 + * - `Rule 17.1 `_ + - Required + - The features of shall not be used + - + * - `Rule 17.3 `_ - Mandatory - A function shall not be declared implicitly @@ -478,12 +490,24 @@ maintainers if you want to suggest a change. have an explicit return statement with an expression - =20 + * - `Rule 17.5 `_ + - Advisory + - The function argument corresponding to a parameter declared to + have an array type shall have an appropriate number of elements + - + * - `Rule 17.6 `_ - Mandatory - The declaration of an array parameter shall not contain the static keyword between the [ ] - =20 + * - `Rule 17.7 `_ + - Required + - The value returned by a function having non-void return type + shall be used + - + * - `Rule 18.3 `_ - Required - The relational operators > >=3D < and <=3D shall not be applied to = objects of pointer type except where they point into the same object @@ -498,6 +522,11 @@ maintainers if you want to suggest a change. instances where Eclair is unable to verify that the code is valid in regard to Rule 19.1. Caution reports are not violations. =20 + * - `Rule 20.4 `_ + - Required + - A macro shall not be defined with the same name as a keyword + - + * - `Rule 20.7 `_ - Required - Expressions resulting from the expansion of macro parameters @@ -506,6 +535,13 @@ maintainers if you want to suggest a change. as function arguments, as macro arguments, array indices, lhs in assignments =20 + * - `Rule 20.9 `_ + - Required + - All identifiers used in the controlling expression of #if or + #elif preprocessing directives shall be #define'd before + evaluation + - + * - `Rule 20.13 `_ - Required - A line whose first token is # shall be a valid preprocessing