From nobody Sun May 12 10:32:49 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=1674680297; cv=none; d=zohomail.com; s=zohoarc; b=JhcOZhEj5PSnR1qFuxSFPxR+rRC6lSzLBgv/mwZQNCsOLZJYqxieu0cyKbZjR7t/AH7foYwZ4q58mvBotee5beQzqHbEa8lW+zOUW7QxZ12CsBJkGsbM5BMhTNhm+Ow2f/oizVHuqN7EX0vWcyHVicfGuh4cjEDGtUyB1XBvlNw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1674680297; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=/uy/GZJY7dXbH0+KOTOHRIlkVDyj77O50qb0LELfA0g=; b=NAfKuEiLN3BIbrJy0Ipdum0RW0558G//N90sKwWU89uSDhgIxrMqljBxUm8WO2R25UbG42oAWhgZwUzGusZTunw//vHsgkDcEUdzFxpkI63O5gfWpMQjavsbvFU3C/VhuhUOU1NGLw8Q50Bh9f8OHwH5kmYtMYRAsAyN3uroMnQ= 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 1674680297109512.089512260384; Wed, 25 Jan 2023 12:58:17 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.484555.751176 (Exim 4.92) (envelope-from ) id 1pKmpz-0004vA-BG; Wed, 25 Jan 2023 20:57:43 +0000 Received: by outflank-mailman (output) from mailman id 484555.751176; Wed, 25 Jan 2023 20:57: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 1pKmpz-0004v3-8J; Wed, 25 Jan 2023 20:57:43 +0000 Received: by outflank-mailman (input) for mailman id 484555; Wed, 25 Jan 2023 20:57:42 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pKmpy-0004ux-Dp for xen-devel@lists.xenproject.org; Wed, 25 Jan 2023 20:57:42 +0000 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id e7fa0eef-9cf2-11ed-91b6-6bf2151ebd3b; Wed, 25 Jan 2023 21:57:41 +0100 (CET) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 4E7EFB81BAA; Wed, 25 Jan 2023 20:57:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B8872C433D2; Wed, 25 Jan 2023 20:57:37 +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: e7fa0eef-9cf2-11ed-91b6-6bf2151ebd3b DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674680258; bh=NjOPVgeL6TzTpB1raybc4GpDzLzYle8JRXOrLMSBex8=; h=From:To:Cc:Subject:Date:From; b=bfeTCjxBCoUud7hi+9tT+TDGcx1QFAdoxLOtHXWet0Mb/L72k3B7fMgJq+CQs+mAq lZgq8+yDRhzNzH4DiIpGuvwR56kPb3I/+mOqKGQvMO8TQd0pxi2671LfqsdQjmheho 4Ul8fvBnm8FlxfZAHzpJ2lBMRWrEgA7jLkC1lD/Y+ziPCVl4B19jYZ1lQIOzsk7L2c uZgDBR8o7bAK+WX0jSrmnRuGUfnVFb1TcPLRwSVw7YnouNP8k7aFDrHl/71qnqWikb zzTUsG4ygPfj39RQYXpc/MLSsIssrUFUKVMmT7JZfftkS7DnXWNuZOVCgKucc6C/sK al2jYZRLSJKzA== From: Stefano Stabellini To: xen-devel@lists.xenproject.org Cc: sstabellini@kernel.org, george.dunlap@citrix.com, andrew.cooper3@citrix.com, jbeulich@suse.com, roger.pau@citrix.com, Bertrand.Marquis@arm.com, julien@xen.org, Stefano Stabellini Subject: [PATCH] Add more rules to docs/misra/rules.rst Date: Wed, 25 Jan 2023 12:57:35 -0800 Message-Id: <20230125205735.2662514-1-sstabellini@kernel.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @kernel.org) X-ZM-MESSAGEID: 1674680299844100001 Content-Type: text/plain; charset="utf-8" From: Stefano Stabellini As agreed during the last MISRA C discussion, I am adding the following MISRA C rules: 7.1, 7.3, 18.3. I am also adding 13.1 and 18.2 that were "agreed pending an analysis on the amount of violations". In the case of 13.1 there are zero violations reported by cppcheck. In the case of 18.2, there are zero violations reported by cppcheck after deviating the linker symbols, as discussed. Signed-off-by: Stefano Stabellini --- docs/misra/rules.rst | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index dcceab9388..1da79f33c1 100644 --- a/docs/misra/rules.rst +++ b/docs/misra/rules.rst @@ -138,6 +138,16 @@ existing codebase are work-in-progress. - Single-bit named bit fields shall not be of a signed type - =20 + * - `Rule 7.1 `_ + - Required + - Octal constants shall not be used + - + + * - `Rule 7.3 `_ + - Required + - The lowercase character l shall not be used in a literal suffix + - + * - `Rule 8.1 `_ - Required - Types shall be explicitly specified @@ -200,6 +210,11 @@ existing codebase are work-in-progress. expression which has potential side effects - =20 + * - `Rule 13.1 `_ + - Required + - Initializer lists shall not contain persistent side effects + - + * - `Rule 14.1 `_ - Required - A loop counter shall not have essentially floating type @@ -227,6 +242,16 @@ existing codebase are work-in-progress. static keyword between the [ ] - =20 + * - `Rule 18.2 `_ + - Required + - Subtraction between pointers shall only be applied to pointers that= address elements of the same array + - + + * - `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 + - + * - `Rule 19.1 `_ - Mandatory - An object shall not be assigned or copied to an overlapping --=20 2.25.1