From patchwork Tue Aug 22 01:30:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 13360029 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 09612EE4996 for ; Tue, 22 Aug 2023 01:30:40 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.587986.919397 (Exim 4.92) (envelope-from ) id 1qYGDv-0000xM-1K; Tue, 22 Aug 2023 01:30:23 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 587986.919397; Tue, 22 Aug 2023 01:30:23 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qYGDu-0000xF-UN; Tue, 22 Aug 2023 01:30:22 +0000 Received: by outflank-mailman (input) for mailman id 587986; Tue, 22 Aug 2023 01:30:21 +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 1qYGDt-0000x3-7p for xen-devel@lists.xenproject.org; Tue, 22 Aug 2023 01:30:21 +0000 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 7414f001-408b-11ee-8782-cb3800f73035; Tue, 22 Aug 2023 03:30:19 +0200 (CEST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 365EF631CD; Tue, 22 Aug 2023 01:30:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D4BAC433C9; Tue, 22 Aug 2023 01:30:16 +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: 7414f001-408b-11ee-8782-cb3800f73035 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692667817; bh=x7ZIUaab4xQmU47UhZ5g+A3jXBvHCK6jXJMADn63+h8=; h=From:To:Cc:Subject:Date:From; b=Bxt3gNtorgJ3Ch3z5sjXPayTQ58QZinFGNNUdWouHsTYaMyhNnIKM+w/1jdrpbOV8 Wq9d52IhYsKwMFcf9hu32m9OmFRdXAD9STauhcs9bex2cUvoLdlEc+mQYWp/ib4Izq OO3ku68lTcSsa1Tv+qGxtG7Z4Wm9fyU6xcJzRISYqK+TDvJJQuXvuoYyH5+bulBW/H MSUs3B9E6Js31yZ+UjWaSR4AfzbZDqHy/SnNIhrWm0xyiAe/amgDfLieueI5H1FFnh +cdF16AdjHNKdYuyQOS8agQAqlLOrXoBLyYdOgWhcnXXywN5hk9AEzZI5w4sV/v60M 1YyAcPXR1fxUw== From: Stefano Stabellini To: xen-devel@lists.xenproject.org Cc: jbeulich@suse.com, andrew.cooper3@citrix.com, roger.pau@citrix.com, julien@xen.org, sstabellini@kernel.org, george.dunlap@citrix.com, bertrand.marquis@arm.com, Stefano Stabellini Subject: [PATCH v2] docs/misra: add exceptions to rules Date: Mon, 21 Aug 2023 18:30:14 -0700 Message-Id: <20230822013014.2523202-1-sstabellini@kernel.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 From: Stefano Stabellini During the discussions that led to the acceptable of the Rules, we decided on a few exceptions that were not properly recorded in rules.rst. Other times, the exceptions were decided later when it came to enabling a rule in ECLAIR. Either way, update rules.rst with appropriate notes. Signed-off-by: Stefano Stabellini Acked-by: Jan Beulich --- v2: - remove autogenerated from D4.10 - remove R2.1 - remove R5.6 - remove R7.1 - reword R8.3 --- docs/misra/rules.rst | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index 8f0e4d3f25..62bd4620fd 100644 --- a/docs/misra/rules.rst +++ b/docs/misra/rules.rst @@ -59,7 +59,8 @@ maintainers if you want to suggest a change. - Required - Precautions shall be taken in order to prevent the contents of a header file being included more than once - - + - Files that are intended to be included more than once do not need to + conform to the directive * - `Dir 4.11 `_ - Required @@ -117,7 +131,7 @@ maintainers if you want to suggest a change. - Required - The character sequences /* and // shall not be used within a comment - - + - Comments containing hyperlinks inside C-style block comments are safe * - `Rule 3.2 `_ - Required @@ -239,13 +256,16 @@ maintainers if you want to suggest a change. - Required - All declarations of an object or function shall use the same names and type qualifiers - - + - The type ret_t maybe be deliberately used and defined as int or + long depending on the type of guest to service * - `Rule 8.4 `_ - Required - A compatible declaration shall be visible when an object or function with external linkage is defined - - + - Allowed exceptions: asm-offsets.c (definitions for asm modules + not called from C code), gcov_base.c (definitions only used in + non-release builds) * - `Rule 8.5 `_ - Required @@ -369,7 +389,9 @@ maintainers if you want to suggest a change. - Required - Expressions resulting from the expansion of macro parameters shall be enclosed in parentheses - - + - Extra parentheses are not required when macro parameters are used + as function arguments, as macro arguments, array indices, lhs in + assignments * - `Rule 20.13 `_ - Required