From patchwork Tue Feb 13 22:33:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 13555797 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 9687AC48260 for ; Tue, 13 Feb 2024 22:33:51 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.680154.1058067 (Exim 4.92) (envelope-from ) id 1ra1LU-00072S-8H; Tue, 13 Feb 2024 22:33:44 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 680154.1058067; Tue, 13 Feb 2024 22:33:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ra1LU-00072K-4x; Tue, 13 Feb 2024 22:33:44 +0000 Received: by outflank-mailman (input) for mailman id 680154; Tue, 13 Feb 2024 22:33:43 +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 1ra1LT-0006lq-60 for xen-devel@lists.xenproject.org; Tue, 13 Feb 2024 22:33:43 +0000 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on20601.outbound.protection.outlook.com [2a01:111:f403:2412::601]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id f01e1dd0-cabf-11ee-8a4d-1f161083a0e0; Tue, 13 Feb 2024 23:33:42 +0100 (CET) Received: from MW4PR03CA0167.namprd03.prod.outlook.com (2603:10b6:303:8d::22) by LV2PR12MB5989.namprd12.prod.outlook.com (2603:10b6:408:171::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.24; Tue, 13 Feb 2024 22:33:38 +0000 Received: from MWH0EPF000971E3.namprd02.prod.outlook.com (2603:10b6:303:8d::4) by MW4PR03CA0167.outlook.office365.com (2603:10b6:303:8d::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.39 via Frontend Transport; Tue, 13 Feb 2024 22:33:37 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by MWH0EPF000971E3.mail.protection.outlook.com (10.167.243.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7292.25 via Frontend Transport; Tue, 13 Feb 2024 22:33:37 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 13 Feb 2024 16:33:36 -0600 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 13 Feb 2024 16:33:36 -0600 Received: from smtp.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Tue, 13 Feb 2024 16:33:35 -0600 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: f01e1dd0-cabf-11ee-8a4d-1f161083a0e0 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CpUVo+0Ov3DJce4tEQemvjKriQZTUEv2ohOAFSqeQu41NBH3t4ui2ybyzAacf6qOD0iID1GMW12hoReM1jo3K2WgfU38OzG8xaarYZkIWI7R8cABj7cYTmAQvSZCbgkiZT5NtBC8Edl/wjR4/nPTzWMXS8IaKgBFMJx0aVabVqfQGvJ7HP7iAx8+DMf9Bp53pkQPb8GqBjWy5jUhzANEzSqzpPiK0ohHxct7KqjhCLt4ci4NT9Z7w8vCNSO9zVLLXF/nj0J26f836LFo4Ka+RSkONO3sy2maVaiRlB2emzj/k1VEQPCkNc+sq5eXvTv6QVLG3F+0ldUhSA0SO4VeNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=p3zfWGoUqrVwRJH/yoaYwBvU4X2LEZOeMLmtpjXSpRM=; b=SjHTdDUzkwzHQZjvwfqQ4qPXYc84OZrSMpTuFJDKStvNHZCTy/8UZOuCJSu9FDF6j3tO5ZxfZxEsO0F3DzbJqVpMwqswD35xsAcgyPNIS9aJ3wDZJ9pOakEbJxBtKzDdfjPCW+biA9yPBTVH3nLdkJ8d9ZtRBWvS7WUz2GBM5IJ7DuCiPh6I7rlkEO7jx+EfFynPhXbX/NGkRWYv+y9ezvGdtULW/akYoLsRZ4//NZEEVBCvXz6yFvzE6pLTVq4dl6QmMJ1jRja/A9MFhdJUyrPoxwFuRXC/mhBQGOob/M5LXq9f0NVMdlAVzLUpxchWwMPRAgmgBRVf6ceMqb5pKg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=p3zfWGoUqrVwRJH/yoaYwBvU4X2LEZOeMLmtpjXSpRM=; b=eSbQ8sdRUu2GhCjyVh3Lp10zLLDgeQZ5CpGEwRKn2jG45RPltBqjj4Y26Uf2J8aTu4sEIXVdejrCc42E5tnPHyEacq4gO4GraG8j/iSGzYthG13zffXAMPI7HEsrhoc7Bhs57LVVH0+Y06rxhCRCDj0tp89vSyyHElww2fLpfNw= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C From: Stefano Stabellini To: CC: , , , , , , , , Subject: [PATCH v2 1/3] docs/misra/rules.rst: add rule 16.6 and 20.12 Date: Tue, 13 Feb 2024 14:33:32 -0800 Message-ID: <20240213223334.3693410-1-stefano.stabellini@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000971E3:EE_|LV2PR12MB5989:EE_ X-MS-Office365-Filtering-Correlation-Id: 21879c1e-281e-44bd-0aee-08dc2ce3d21e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TjsqiEo5Rs1uKXDoH6YyqaZA3Rb4eP44xMs5DU61x45jQy4n+QCvJbn3A3yfaiN0VhlTi6eOwcngJWK8bF9m/qD16QlWA+JEvYOjfNQ1C7X66ZyJ6fLgQm2tKelPenBnlFNIxRbF7ptud/k/+oc6IVWezqqBbMu1zsO3JyrZvNl68xUdncWgVScCKhfZMwJcOVbI9bkLaBFJbFiHUJjRCihTLelQNW+Yu2P8R6CC6vqfx3AvpBI0HTZEM0+YUBFeiiN0Jstn0XldUhzqtRWZiB2ICbnowUVAxQ7TU3MrnGnM/gnPstrUPP+OHr6n0VB0npqL0ve7rF9CZFw1BrdYBnCyT1hPOY1Q932CA3fI6eZSsChdHFV3G+uAvA9oTBrEJ0RStAM5EF8+c96N0iO/Bst0nxdxs+WjHCxejcPEF4JVZibrHTE7nri8NJJkaOeOYSyBOs29BAPTyTfxbTorN48JZefVcJzSJpELXJgQVvyRdLgeQWO+7GhtGUkembNCLDnmDKYABCBcsLYXkVL6T3Wf4P/ssE/yoa4TYHe+R5qQO3uPkQxrqHm8/IiQnI6sb/kT5K7+PXMOpY4VtmUmLzvhniTYo9qzxfGxuvDpBzpr2KRF7ynb2JovwD0qDEhr X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(346002)(136003)(39860400002)(396003)(376002)(230922051799003)(82310400011)(186009)(1800799012)(64100799003)(451199024)(40470700004)(36840700001)(46966006)(36756003)(8676002)(426003)(2616005)(26005)(1076003)(41300700001)(478600001)(70206006)(8936002)(5660300002)(4326008)(6916009)(54906003)(70586007)(6666004)(316002)(86362001)(82740400003)(81166007)(356005)(336012)(44832011)(2906002);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Feb 2024 22:33:37.2744 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 21879c1e-281e-44bd-0aee-08dc2ce3d21e X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: MWH0EPF000971E3.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR12MB5989 Signed-off-by: Stefano Stabellini Acked-by: Julien Grall --- docs/misra/rules.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index 182331089d..c185366966 100644 --- a/docs/misra/rules.rst +++ b/docs/misra/rules.rst @@ -478,6 +478,12 @@ maintainers if you want to suggest a change. adhere to Rule 16.2 would result in increased complexity and maintenance difficulty, and could potentially introduce bugs. + * - `Rule 16.6 `_ + - Required + - Every switch statement shall have at least two switch-clauses + - Single-clause switches are allowed when they do not involve a + default label. + * - `Rule 16.7 `_ - Required - A switch-expression shall not have essentially Boolean type @@ -554,6 +560,13 @@ maintainers if you want to suggest a change. evaluation - + * - `Rule 20.12 `_ + - A macro parameter used as an operand to the # or ## operators, + which is itself subject to further macro replacement, shall only + be used as an operand to these operators + - Required + - Variadic macros are allowed to violate the rule. + * - `Rule 20.13 `_ - Required - A line whose first token is # shall be a valid preprocessing From patchwork Tue Feb 13 22:33:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 13555798 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 C28BEC48BC1 for ; Tue, 13 Feb 2024 22:33:53 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.680156.1058084 (Exim 4.92) (envelope-from ) id 1ra1LV-0007LV-Si; Tue, 13 Feb 2024 22:33:45 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 680156.1058084; Tue, 13 Feb 2024 22:33:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ra1LV-0007Kx-M8; Tue, 13 Feb 2024 22:33:45 +0000 Received: by outflank-mailman (input) for mailman id 680156; Tue, 13 Feb 2024 22:33:44 +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 1ra1LU-00072L-F8 for xen-devel@lists.xenproject.org; Tue, 13 Feb 2024 22:33:44 +0000 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on20600.outbound.protection.outlook.com [2a01:111:f403:2415::600]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id f0048d57-cabf-11ee-98f5-efadbce2ee36; Tue, 13 Feb 2024 23:33:42 +0100 (CET) Received: from BL1PR13CA0329.namprd13.prod.outlook.com (2603:10b6:208:2c1::34) by PH8PR12MB7349.namprd12.prod.outlook.com (2603:10b6:510:217::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.26; Tue, 13 Feb 2024 22:33:38 +0000 Received: from MN1PEPF0000ECD7.namprd02.prod.outlook.com (2603:10b6:208:2c1:cafe::86) by BL1PR13CA0329.outlook.office365.com (2603:10b6:208:2c1::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.38 via Frontend Transport; Tue, 13 Feb 2024 22:33:38 +0000 Received: from SATLEXMB03.amd.com (165.204.84.17) by MN1PEPF0000ECD7.mail.protection.outlook.com (10.167.242.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7292.25 via Frontend Transport; Tue, 13 Feb 2024 22:33:37 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 13 Feb 2024 16:33:37 -0600 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 13 Feb 2024 16:33:37 -0600 Received: from smtp.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Tue, 13 Feb 2024 16:33:36 -0600 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: f0048d57-cabf-11ee-98f5-efadbce2ee36 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KLTmGALbAyL+wry9LrcYzL0YwM1WbKDxmGMJXU11NW2l3zY3jeZAi4u+b7yy5wG33wT2Nt1R5KxCG7apn3Kg5gvw1DEFKpUljtrikZu3OXsx3TrfW/ZBUg/OjS2JhgeDVZD05nJUrKe7nTe333hi9o//G3KuytcPHAIjhACRU8bFT0DzkMF8FjqAKfvjDu5v96lVYQOPaAGCHwy2w9hQagDcgCFaLaGfQnEYVV2NUN1rFpQ3tUJ5tCLaJ6kV3idRGnrBmBB1+AC8apR5lX/2EW/alzB1BIgrbuOYhdSkIdsIZx7jlk7HKdwucWT7j/Ai/mj10Rj3j6entrKYw4tMVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=cIqzI8kYaY2Zo0nCOY7w4aQD8+SXQqH7qpdvGMs6SHo=; b=nCTjsaxSXnPvX0cxEgGQghEbSaTF82yRvL5Qd+ieWIBUKp9/bgFK34ARPn/t+PTqx53Vji4OqgcmEuwt5NDXxVZCNvootdevI3zs5+tUuxdDoST5+tgDBbBevEytpK0ZJRrECV3r7pdYEN8pvcCf6hf73vWSRH+I8sBfwtKH4yH6+DMdOkSYIF2KIN5/TRFNJ/eMysjAq536Fo0cT+4xtF9Q8Du9oc4gnV7u2+WgtGqnmW8bKTm3sVpH7vRNF+aMisFgxit20gkH73hwbgLwOMN+Gw+wNsZG/N56fk/ehZjgOPuPTeDFFEo8ILNOiVQg1cwBZl4RdoGxcMZzIB1BhQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cIqzI8kYaY2Zo0nCOY7w4aQD8+SXQqH7qpdvGMs6SHo=; b=kuIya99sCkprdU4SPSRSRpDgeeuDnrbHAvc/5KyIdCcIkVb67fOk1rPykqR5vgG1DS3Svr/njZXYyQ+d2ervfwQbDywzXyXd6M3MNCiD/5mpVrZyrzcEF4TfZWcWiAgPWQbyzXHhmBw3ygurUJAUff46a6KpzFoYebVJkHvB87E= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C From: Stefano Stabellini To: CC: , , , , , , , , Subject: [PATCH v2 2/3] docs/misra/rules.rst: add rule 5.5 Date: Tue, 13 Feb 2024 14:33:33 -0800 Message-ID: <20240213223334.3693410-2-stefano.stabellini@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN1PEPF0000ECD7:EE_|PH8PR12MB7349:EE_ X-MS-Office365-Filtering-Correlation-Id: 7f264f48-f1a9-4513-2662-08dc2ce3d270 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9KyuUhoLSi1EwbI6V3sfrIB/Pt8Mw0bCs8WvgzeJb2Uj3X/YSbKyX+91Bs7UHWxKHxDPuoxGCPs0Tdl+sR06tpbYX9vI5qsoNDQnuKMlMT2TQhSzprSf7FjhVND+X0bOemTrpJKHi6xtPI6jM9PMj1VI0U627D8eCBrf3c0SR8sKybpBdWuEF7EJ+uTemZJ7JA3lX3YWbdOj4x28CPUSqxbXXtlrPVYp0tRWErU3idTSjRwyOe3PLSU0XSbjqpnOXdmbPrbpV3SxItnUaDbEN8g9BqinlU59eWJwgRwDsyxbxk8p+06dB9aYMl6J5dzdnKDcwGZ+FsAbcvq7n+FbOttgf2cmg3Fy+UDA8LZiJ92uoNisAvVi7ONd180CNu0IrGdoaoq7FGupTpV3wdR+kDQSKOONpuBG9kgbkvhDOXRaC+85JbyqjeYop/wCQAnIiZc/DBYMVoe+5veMxtLUTODe63uPCaxmPqUtIco9PKOsBvqKyPA5TLEFKkbF1JQ66RM4dEDaA/sdp1NuTBXK4Saiwdjff7uzbbwRw87afOS8Lmp/qoo3Cu+zOBT1h3NbkG02qQ3KDGbZ4lMg6uwvaQ== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(136003)(396003)(346002)(39860400002)(376002)(230922051799003)(451199024)(1800799012)(82310400011)(186009)(64100799003)(46966006)(36840700001)(40470700004)(86362001)(8936002)(8676002)(5660300002)(70586007)(82740400003)(4326008)(4744005)(6916009)(36756003)(2906002)(478600001)(44832011)(426003)(336012)(2616005)(26005)(356005)(81166007)(70206006)(1076003)(316002)(54906003)(6666004)(41300700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Feb 2024 22:33:37.9062 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7f264f48-f1a9-4513-2662-08dc2ce3d270 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: MN1PEPF0000ECD7.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB7349 Signed-off-by: Stefano Stabellini --- docs/misra/rules.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index c185366966..931158b354 100644 --- a/docs/misra/rules.rst +++ b/docs/misra/rules.rst @@ -181,6 +181,12 @@ maintainers if you want to suggest a change. headers (xen/include/public/) are allowed to retain longer identifiers for backward compatibility. + * - `Rule 5.5 `_ + - Required + - Identifiers shall be distinct from macro names + - Clashes between function-like macros and non-callable entities + are allowed. The pattern #define x x is also allowed. + * - `Rule 5.6 `_ - Required - A typedef name shall be a unique identifier From patchwork Tue Feb 13 22:33:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 13555799 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 E7342C4829F for ; Tue, 13 Feb 2024 22:33:53 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.680155.1058078 (Exim 4.92) (envelope-from ) id 1ra1LV-0007Hv-Fv; Tue, 13 Feb 2024 22:33:45 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 680155.1058078; Tue, 13 Feb 2024 22:33:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ra1LV-0007Hn-CU; Tue, 13 Feb 2024 22:33:45 +0000 Received: by outflank-mailman (input) for mailman id 680155; Tue, 13 Feb 2024 22:33:44 +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 1ra1LU-0006lq-6L for xen-devel@lists.xenproject.org; Tue, 13 Feb 2024 22:33:44 +0000 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on20601.outbound.protection.outlook.com [2a01:111:f403:2409::601]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id f10b30f7-cabf-11ee-8a4d-1f161083a0e0; Tue, 13 Feb 2024 23:33:42 +0100 (CET) Received: from MW4PR03CA0174.namprd03.prod.outlook.com (2603:10b6:303:8d::29) by MN6PR12MB8541.namprd12.prod.outlook.com (2603:10b6:208:47a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.26; Tue, 13 Feb 2024 22:33:39 +0000 Received: from MWH0EPF000971E3.namprd02.prod.outlook.com (2603:10b6:303:8d:cafe::dc) by MW4PR03CA0174.outlook.office365.com (2603:10b6:303:8d::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.41 via Frontend Transport; Tue, 13 Feb 2024 22:33:39 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by MWH0EPF000971E3.mail.protection.outlook.com (10.167.243.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7292.25 via Frontend Transport; Tue, 13 Feb 2024 22:33:39 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 13 Feb 2024 16:33:38 -0600 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 13 Feb 2024 16:33:38 -0600 Received: from smtp.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Tue, 13 Feb 2024 16:33:37 -0600 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: f10b30f7-cabf-11ee-8a4d-1f161083a0e0 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mOwfAcMZPgHCWxG/koGBqR4f3sex3ECXOf/H6hVdb4rVQyYgDQ6mtxr9Z2GOprDQ7+vWanoftorv7YJkSopXVXVU+/AmjOnMMRaz1GWhVA74fyBCUMMhQG7HLCHO3H8EnraataC4R9zheSTffg55lBbf6zuK7XkSiR6S77UliKsQb23xxiG+UP6ZNsEz4iJ/MXvKOXWXM5YjLevydoomDmPK/qmsFkjtZh6GdDpmZkkABWrjdyFTV/mQkxupcw1PZMyCYyAVkdkm3PFwNnTAB7CdR8252v1+8toUzlTlIZFXGssQSX18grwYP22xjHPImpu+k6lmTGPxnjVnlm/ebA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fMlULJhvmyTxrcJKAvuzeEpM4IUs0jtR0Nuwpoxpqos=; b=m2gllIaQRPdwmog3iuLQgUsehqvLIQIQDtj4gpEDrIzop8afxHCQXjhOB35Vrb9q/yGZj2eaCx/PZ/+tyN2i8AXGoC+KxmmPiSXZ05Da4d5YYxG6C2K6xG0BXFUwCn5dLI0jibQBCB7kJ2EtYVdzShXTTgG1pWarAlmf5Im0YqoZTT0Zf30JPDxooZUwojhKlWcfGoWjah70sJPxP5wfpMqOlFT9dn8tiugmlwR83tFk6yn7dEFPXLFbd/ptuanVchwIT+uCM0Hc8JvAz5ZF70ncyVON4M8MHu6wrLFzGu/Gu1kDBIQiEliewII0pEV409oY6Ie71gbdGG6KyBJpjQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fMlULJhvmyTxrcJKAvuzeEpM4IUs0jtR0Nuwpoxpqos=; b=X7eLJEDNXlB6nzEFZESC94f81TK51C55nUd0LfKdkTSl54bs99YIpMDIsC4tLRS1iqq2kfl2UV/dKbn9Gcr/dM/v4RLdicUfL1zGCYH3ipYVY4cdg+ilVHi054wtO3svQgwQFba8tNw8UhVg4/2+QvuMQ/cgfmK7yZ47aVsyDQ0= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C From: Stefano Stabellini To: CC: , , , , , , , , Subject: [PATCH v2 3/3] docs/misra/rules.rst: add rule 14.4 Date: Tue, 13 Feb 2024 14:33:34 -0800 Message-ID: <20240213223334.3693410-3-stefano.stabellini@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000971E3:EE_|MN6PR12MB8541:EE_ X-MS-Office365-Filtering-Correlation-Id: 3da4ff8e-5b8a-499c-36bd-08dc2ce3d36e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HMqEZAmaelDMIsmHF6y+F9dPA0Qd4cWV6apIzEhAm4KJkQNFalJ2grwndN+/h/Jx+kWPbMxPkj1hcbAcTXr0ex/tkjPGVksvg3rGFc/AdegOHtUUFb8V46EOUmY2uVfgzn8qxJb3Czdcs4UuV8dsFbhK7vnb4BvffvRseI/SD6Dbp14+PYyhqO0cbQ0upL0OcwldN2ruX+qX2XWB5BTcM4yHyFmaprXwbnlBJ3uKNhislW8NxbIF76BgpukfBL/LxAy+doLsZz618Njl9Af4vDX5DRMtLbp9THhrQeG6RVx6bi4DYRTy81uBAdmkMgjfEjexinq1aWwmal6wUMHeQJxuu4k2MusGCo08w0Us3gLwwCYcDpJNBhqDrxq2ZJwQu6SK1g+SJyidknH2YrQ97i16uQUDfaU30EKCZqkzoRyFGwYXsUWs7gwTDS8OYONeTpr62AuwSiZcOm2hVhLh8ivwR7+kIEsvJFRpm/QHg6iPO0rYshigFMunu1L55OhUeEbaLIgp+hCpRlyWkEbJLWZeVE2Zhm0o8vArNIKW0KTLDp7nxno10pEja69H/KdMGvKwS5YqjOIQl3R06R0nGV4ieWiR+2NrFGRjhic8SIM0cCYuuZbNq5Unol7gXuWx X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(346002)(396003)(376002)(136003)(39860400002)(230922051799003)(1800799012)(186009)(82310400011)(451199024)(64100799003)(40470700004)(46966006)(36840700001)(2906002)(5660300002)(4326008)(41300700001)(8936002)(44832011)(8676002)(356005)(86362001)(82740400003)(81166007)(36756003)(2616005)(54906003)(316002)(6916009)(336012)(6666004)(426003)(1076003)(70586007)(70206006)(478600001)(26005);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Feb 2024 22:33:39.4619 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3da4ff8e-5b8a-499c-36bd-08dc2ce3d36e X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: MWH0EPF000971E3.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN6PR12MB8541 Signed-off-by: Stefano Stabellini Acked-by: Bertrand Marquis --- docs/misra/rules.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index 931158b354..3e6f94d7bd 100644 --- a/docs/misra/rules.rst +++ b/docs/misra/rules.rst @@ -468,6 +468,15 @@ maintainers if you want to suggest a change. while(0) and while(1) and alike are allowed. + * - `Rule 14.4 `_ + - Required + - The controlling expression of an if-statement and the controlling + expression of an iteration-statement shall have essentially + Boolean type + - Automatic conversions of integer types to bool are permitted. + Automatic conversions of pointer types to bool are permitted. + This rule still applies to enum types. + * - `Rule 16.3 `_ - Required - An unconditional break statement shall terminate every