From nobody Thu May 9 20:51:47 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=1694049752; cv=none; d=zohomail.com; s=zohoarc; b=iDFxM88Jps3Mq3UTkWa4+9Ycv2i1I9GFcQF6sPuycKlzLyjdT49YcrIa0BD3/WX1QLdk9w4S+4Voez5+73EQwYaKgI7F5RosXWDYAEupYlv8ANN5RpLB+mGQD5Cp1SDkME5mzjlP9Bz1yThAmID3+4iFEHXeWfc2bKQhfWf3QhA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1694049752; 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=YAeAlSYh7xgD/MrgUQX/y3RSJfjknhUFP4/GDccx1KQ=; b=DwfZUL/adVessrQI7O0wScTOoDVBWaLmK4MRLmWUCo6xAev+uF+n/Wdw8lE1ynVPP0/4HUuOvwbhoWsHMC/rer4f43i4Z4FmFfLhQrkkwZy2ehsJLroL/rM/qsV0OYT/LA4cy+paK+VF2yGXoR3AgijZ7hobrmqpfoJclSLu/dc= 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 1694049752053505.1799045272593; Wed, 6 Sep 2023 18:22:32 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.597043.931203 (Exim 4.92) (envelope-from ) id 1qe3im-0007qx-9r; Thu, 07 Sep 2023 01:22:12 +0000 Received: by outflank-mailman (output) from mailman id 597043.931203; Thu, 07 Sep 2023 01:22:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qe3im-0007qq-6Y; Thu, 07 Sep 2023 01:22:12 +0000 Received: by outflank-mailman (input) for mailman id 597043; Thu, 07 Sep 2023 01:22:10 +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 1qe3ik-0006y7-U5 for xen-devel@lists.xenproject.org; Thu, 07 Sep 2023 01:22:10 +0000 Received: from ams.source.kernel.org (ams.source.kernel.org [2604:1380:4601:e00::1]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id f77a4df0-4d1c-11ee-8783-cb3800f73035; Thu, 07 Sep 2023 03:22:10 +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 ams.source.kernel.org (Postfix) with ESMTPS id C74D0B81D3A; Thu, 7 Sep 2023 01:22:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 12494C433C8; Thu, 7 Sep 2023 01:22:06 +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: f77a4df0-4d1c-11ee-8783-cb3800f73035 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694049728; bh=bs/dcggUZ/Oiz4QqfXxtmXxh/V+hsKtSAq2RX6E0gkc=; h=From:To:Cc:Subject:Date:From; b=g8dlzYmsLraTat9mW1WUXCh6bzTCFByresDRLJ1rrHDMOs5gP1jKqGMeEFGXlZ+Wy 9/HK3mgbUWMqgwLooEDO/sKwxRSFVnP4Bd5h0eokhUE+BpIcSjRyVY0i4IxU6Q3CZD N90Vt+UQVjlGaci+KMhp9fMv2vxJ+CBc12ynajrKnDrVFJMrZFlg3gFu6mS3MasD/F wSQHNFpJv53VfFyqpZ6KTjGe43tNpXtXPBy8CAF6dYOdhkMQ6ockbxV2YAKJ08wY/m wTrXkWz17UPnSF6RnT378YnqHx4UXajbspqKA8HfOuXoWyBIewV9kDNiJEkQG1As3R zY0wTblZhx4+Q== 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, roberto.bagnara@bugseng.com, nicola.vetrini@bugseng.com, Stefano Stabellini Subject: [PATCH v2] docs/misra: add 14.3 Date: Wed, 6 Sep 2023 18:22:03 -0700 Message-Id: <20230907012203.1238090-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: 1694049753594100001 Content-Type: text/plain; charset="utf-8" From: Stefano Stabellini Add 14.3, with project-wide deviations. Also take the opportunity to clarify that parameters of function pointer types are expected to have names (Rule 8.2). Signed-off-by: Stefano Stabellini --- Changes in v2: - add switch to the Rule 14.3 exceptions - add "and alike" for while(0) and while(1) --- docs/misra/rules.rst | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index 34916e266a..3d8d1633a4 100644 --- a/docs/misra/rules.rst +++ b/docs/misra/rules.rst @@ -234,7 +234,8 @@ maintainers if you want to suggest a change. * - `Rule 8.2 `_ - Required - Function types shall be in prototype form with named parameters - - + - Clarification: both function and function pointers types shall + have named parameters. =20 * - `Rule 8.3 `_ - Required @@ -385,6 +386,17 @@ maintainers if you want to suggest a change. - A loop counter shall not have essentially floating type - =20 + * - `Rule 14.3 `_ + - Required + - Controlling expressions shall not be invariant + - Due to the extensive usage of IS_ENABLED, sizeof compile-time + checks, and other constructs that are detected as errors by MISRA + C scanners, managing the configuration of a MISRA C scanner for + this rule would be unmanageable. Thus, this rule is adopted with + a project-wide deviation on if ?: and switch statements. + + while(0) and while(1) and alike are allowed. + * - `Rule 16.7 `_ - Required - A switch-expression shall not have essentially Boolean type --=20 2.25.1