From patchwork Wed Sep 18 20:23:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 13807141 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 A6780CDD553 for ; Wed, 18 Sep 2024 20:23:33 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.800428.1210354 (Exim 4.92) (envelope-from ) id 1sr1Cw-0003PC-AJ; Wed, 18 Sep 2024 20:23:26 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 800428.1210354; Wed, 18 Sep 2024 20:23:26 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sr1Cw-0003P5-7i; Wed, 18 Sep 2024 20:23:26 +0000 Received: by outflank-mailman (input) for mailman id 800428; Wed, 18 Sep 2024 20:23:24 +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 1sr1Cu-0003Or-LI for xen-devel@lists.xenproject.org; Wed, 18 Sep 2024 20:23:24 +0000 Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id d9add269-75fb-11ef-99a2-01e77a169b0f; Wed, 18 Sep 2024 22:23:22 +0200 (CEST) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id E4027A43896; Wed, 18 Sep 2024 20:23:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7CAFEC4CEC2; Wed, 18 Sep 2024 20:23:20 +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: d9add269-75fb-11ef-99a2-01e77a169b0f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1726691001; bh=vOu/o5clrzCVae86YzB7vo3nlDfwj2I+Qqqu2LEkIz8=; h=Date:From:To:cc:Subject:From; b=EuQSLH5DgKUQH9vOAVfDLy+FC86w/kd3k07CWXFFDN/voqB3/vVhOmlRxW8HuOCbW tw9MZLQ2dCMKVQZvgVsf/DDruh2DYYgEtLk3leeGjwluF2yGgeQmkudJocLxnMkNq3 vGhRnMYgmQpdlieuP2gLrpvx0Qzar/WFygEZHcdMNscA2CaCh5PsJkD6CVk5oje8Px 6ZvX6XBnSR5oh4eGvJSfSj+MrP3ojwvsaNBLm0qoynJ0bg4x0WcS+jvowkSZQgKcpk gCcL/L2IK/ZhMYLzTN+fK4wMs6WDSHpqnZTGZr8Y2ao6Gjv/eNSdcCenqh0LlmMCUT wQBZjEohi07Uw== Date: Wed, 18 Sep 2024 13:23:19 -0700 (PDT) From: Stefano Stabellini X-X-Sender: sstabellini@ubuntu-linux-20-04-desktop To: xen-devel@lists.xenproject.org cc: sstabellini@kernel.org, Andrew Cooper , Jan Beulich , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Bertrand Marquis , Julien Grall , michal.orzel@amd.com Subject: [PATCH v2] docs/misra: add R17.2 and R18.2 Message-ID: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 The Xen community is already informally following both rules. Let's make it explicit. Both rules have zero violations, only cautions. While we want to go down to zero cautions in time, adding both rules to rules.rst enables us to immediately make both rules gating in the ECLAIR job part of gitlab-ci. Signed-off-by: Stefano Stabellini Acked-by: Bertrand Marquis --- Changes in v2: - improve the note of 17.2 diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index e99cb81089..4a144da8d6 100644 --- a/docs/misra/rules.rst +++ b/docs/misra/rules.rst @@ -561,6 +561,13 @@ maintainers if you want to suggest a change. - The features of shall not be used - + * - `Rule 17.2 `_ + - Required + - Functions shall not call themselves, either directly or indirectly + - Limited forms of recursion are allowed if the recursion is bound + (there is an upper limit and the upper limit is enforced.) The + bounding should be explained in a comment or in a deviation. + * - `Rule 17.3 `_ - Mandatory - A function shall not be declared implicitly @@ -593,6 +600,12 @@ maintainers if you want to suggest a change. submitting new patches please try to decrease the number of violations when possible. + * - `Rule 18.1 `_ + - Required + - A pointer resulting from arithmetic on a pointer operand shall + address an element of the same array as that pointer operand + - + * - `Rule 18.2 `_ - Required - Subtraction between pointers shall only be applied to pointers