From nobody Thu Jan 30 08:35:02 2025 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=bugseng.com ARC-Seal: i=1; a=rsa-sha256; t=1731487334; cv=none; d=zohomail.com; s=zohoarc; b=eiZJX7YyEpSfiWQW/UN4c2jaPlqVUBS4CZ4su6xAK/jlmLSul0PPGYkMTWzSBZ1p2RRND8wf8s3lx3V87Xm2p0maqOTu6Jf/CMIska6GDax7wwwxngrCV1xTmQeI9BgKtjvGRm0d3TX7KhFKNS+WtrhvpXDHRf1zrIKjkAJXmxE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1731487334; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=9bibA5V3LVtcVgOyR8dlAtaQoaXLNpzP8/kugy92Ybg=; b=kZpDI3baKHNXM/egrCL6hLb9Y4gaTywiUigLXq4jKtNBs0MQ/Qg3Xye9zzB3eRJ+oev2k5oY5cK5DTSnX5FpdVeYsP+72zlRlKisxAgkSUs9EkcOcN2HhQORNAuHeayYVvqDwzIMrVxKg6ezbewt6iDUEmFENryv1qbwVfvfsxU= 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 1731487334006322.6828416143694; Wed, 13 Nov 2024 00:42:14 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.835130.1250969 (Exim 4.92) (envelope-from ) id 1tB8wa-0000HY-K7; Wed, 13 Nov 2024 08:41:44 +0000 Received: by outflank-mailman (output) from mailman id 835130.1250969; Wed, 13 Nov 2024 08:41: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 1tB8wa-0000HR-Ez; Wed, 13 Nov 2024 08:41:44 +0000 Received: by outflank-mailman (input) for mailman id 835130; Wed, 13 Nov 2024 08:41: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 1tB8wZ-0000HK-7G for xen-devel@lists.xenproject.org; Wed, 13 Nov 2024 08:41:43 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 1a25ab4f-a19b-11ef-a0c7-8be0dac302b0; Wed, 13 Nov 2024 09:41:40 +0100 (CET) Received: from delta.homenet.telecomitalia.it (host-82-59-161-229.retail.telecomitalia.it [82.59.161.229]) by support.bugseng.com (Postfix) with ESMTPSA id AF1A24EE073E; Wed, 13 Nov 2024 09:41:38 +0100 (CET) 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: 1a25ab4f-a19b-11ef-a0c7-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjE2Mi41NS4xMzEuNDciLCJoZWxvIjoic3VwcG9ydC5idWdzZW5nLmNvbSJ9 X-Custom-Transaction: eyJpZCI6IjFhMjVhYjRmLWExOWItMTFlZi1hMGM3LThiZTBkYWMzMDJiMCIsInRzIjoxNzMxNDg3MzAwLjY0OTQzMywic2VuZGVyIjoiYWxlc3NhbmRyby56dWNjaGVsbGlAYnVnc2VuZy5jb20iLCJyZWNpcGllbnQiOiJ4ZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bugseng.com; s=mail; t=1731487299; bh=Auwitcc81tqmJQ/dEGLefdDXa7T3qBP/amuAto1B4FE=; h=From:To:Cc:Subject:Date:From; b=yPky5YYQ/qe64DYl8gdaYfrhPxYFaGwmbcGrpscNagPUqmJ27b/vt2IEgueQz9LtN V6XFITLCAVuPHsKwN/jQFoJFNe8lFXUB6ttfNJl1L7iqZ1M8tX7B3BVAT0Z8Qy7rKy XdqGJMmOry/zn+zv4N0oFirQelOVlESBYrrV+WmYkNNQOpswSOQczLmiJzUARDrCxP iBu1UQOVfEYE8/ed3KgF4lGhgaHJc5kiOYS4V4cW2IqQjw0s2FHrlnnGINvVYHzRfm xgzvBnKIw30gke8ez284ck2F+ZOTIVYo/dFSqzOKK1yYueElyMqZ0etHjCGgGI6uiy byDEFIgEimLeQ== From: Alessandro Zucchelli To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Alessandro Zucchelli , Simone Ballarin , Doug Goldstein , Stefano Stabellini , Andrew Cooper , Jan Beulich , Julien Grall Subject: [PATCH] xen:add deviations for MISRA C 2012 Rule R5.2 Date: Wed, 13 Nov 2024 09:41:26 +0100 Message-ID: <41a1127e6d77d2be350e7679bd1034e0c2918e94.1731487210.git.alessandro.zucchelli@bugseng.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @bugseng.com) X-ZM-MESSAGEID: 1731487334613116600 Content-Type: text/plain; charset="utf-8" This addresses violations of MISRA C:2012 Rule 5.2 which states as following: Identifiers declared in the same scope and name space shall be distinct. This deviation addresses violations of Rule 5.2 arising from identifiers generated through token pasting macros CHECK_NAME_ and DEFINE_COMPAT_HANDLE. No functional change. Signed-off-by: Alessandro Zucchelli --- automation/eclair_analysis/ECLAIR/deviations.ecl | 4 ++++ docs/misra/deviations.rst | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/= eclair_analysis/ECLAIR/deviations.ecl index c5663eed2b..ee1ac3b602 100644 --- a/automation/eclair_analysis/ECLAIR/deviations.ecl +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl @@ -88,6 +88,10 @@ it defines would (in the common case) be already defined= . Peer reviewed by the c # Series 5. # =20 +-doc_begin=3D"Identifiers generated through the following token pasting ma= cros are excluded from compliance to this rule" +-config=3DMC3R1.R5.2,reports+=3D{safe, "any_area(any_loc(any_exp(macro(^CH= ECK_NAME_$))&&any_exp(macro(^DEFINE_COMPAT_HANDLE$))))"} +-doc_end + -doc_begin=3D"The project adopted the rule with an exception listed in 'docs/misra/rules.rst'" -config=3DMC3R1.R5.3,reports+=3D{safe, "any_area(any_loc(any_exp(macro(^RE= AD_SYSREG$))&&any_exp(macro(^WRITE_SYSREG$))))"} diff --git a/docs/misra/deviations.rst b/docs/misra/deviations.rst index 15a993d050..aa98acc45f 100644 --- a/docs/misra/deviations.rst +++ b/docs/misra/deviations.rst @@ -97,6 +97,13 @@ Deviations related to MISRA C:2012 Rules: are not instances of commented-out code. - Tagged as `safe` for ECLAIR. =20 + * - R5.2 + - Macros CHECK_NAME_ and DEFINE_COMPAT_HANDLE through token pasting + generate non-compliant identifiers. Such identifiers are allowed. + - Tagged as `safe` for ECLAIR. So far, the following macros are devia= ted: + - CHECK_NAME_ + - DEFINE_COMPAT_HANDLE + * - R5.3 - As specified in rules.rst, shadowing due to macros being used as ma= cro arguments is allowed, as it's deemed not at risk of causing develop= er --=20 2.43.0