From nobody Sat Nov 23 04:12:39 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=1710462929; cv=none; d=zohomail.com; s=zohoarc; b=Xnsi6qSY847yHFZuPwngGdSWoIjNuV64L8HfEOz2vchTXAN2+GG3w/4sdhzoOcDoaZgXkgR51jicbAsKJlxk63OMLIaiQ/GyEC5sFwe1VuSkStFMIkREwlxSZoKAm6Fo9SJQxpj5djBLF3tYnUIYHFe340qjzSDOOLgfe/R2FJ8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1710462929; h=Content-Type: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=1WYgJP8A7CRuGOCbULL//prrPI78Dhu/WsRbBMPFVpk=; b=jktrV0ONTFrTeACegjUiOMSHuuozji2cgt5zXPo9RbeGtYGs2Z2waX6JLeI/PgMjhz1RsllOD2PJAeREuVapdAa8/dpWFywDewVwgrUFTNzMhRY/5xBk/jmc+piTjLsLeNLhOVVhdkFogDi9NAIVqCXkzXEkmHTo/UP1Kz4GagA= 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 1710462929671969.1831005030856; Thu, 14 Mar 2024 17:35:29 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.693600.1081945 (Exim 4.92) (envelope-from ) id 1rkvXU-0002Cv-Nb; Fri, 15 Mar 2024 00:35:12 +0000 Received: by outflank-mailman (output) from mailman id 693600.1081945; Fri, 15 Mar 2024 00:35: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 1rkvXU-0002Co-Kv; Fri, 15 Mar 2024 00:35:12 +0000 Received: by outflank-mailman (input) for mailman id 693600; Fri, 15 Mar 2024 00:35:11 +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 1rkvXT-0002Cc-Aq for xen-devel@lists.xenproject.org; Fri, 15 Mar 2024 00:35:11 +0000 Received: from sin.source.kernel.org (sin.source.kernel.org [2604:1380:40e1:4800::1]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id dfcce535-e263-11ee-afdd-a90da7624cb6; Fri, 15 Mar 2024 01:35:09 +0100 (CET) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 53B23CE1F0B; Fri, 15 Mar 2024 00:35:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 72127C433C7; Fri, 15 Mar 2024 00:35:05 +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: dfcce535-e263-11ee-afdd-a90da7624cb6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710462906; bh=0w+MdDqKlm43yhbmnOm/SBn6kayFfUY9JQ+jwjYZNAk=; h=Date:From:To:cc:Subject:From; b=EgCvpnQJ1arwCbQPhXpdsbADIVI4MCkiD8gkG4tsuJSTaj+zwpMpoN0BU4zxeaR9W olKBXyPS+ChghFa3dJ3flEnw4bu/vXJPlbP3BJEbfwhuCsQxQKhqZrdUIv+j/Ndo3Q HKzL0tquheXnBca2RBeNkP7O7QDEXphcj3umw28H5jjkKtfa6FVG9S3BtiEMW+6pQ5 D9UdIzDqh+HilkC8ufi1JxtgRjTRE+MtoPQhhDxX2SaXY5a98sfhiU8LBBLusWZgzm 1oywlRQsrdeVzprEy5nS1+UW+3aJ1zIEBuZYZjuXafxCxeZedQsjmA7QYZUyIBQOXQ LvR4NZmwt1/xA== Date: Thu, 14 Mar 2024 17:35:03 -0700 (PDT) From: Stefano Stabellini X-X-Sender: sstabellini@ubuntu-linux-20-04-desktop To: xen-devel@lists.xenproject.org cc: andrew.cooper3@citrix.com, bertrand.marquis@arm.com, george.dunlap@citrix.com, jbeulich@suse.com, julien@xen.org, michal.orzel@amd.com, roger.pau@citrix.com, sstabellini@kernel.org Subject: [PATCH v3] docs/misra/rules.rst: add rule 5.5 Message-ID: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 X-ZohoMail-DKIM: pass (identity @kernel.org) X-ZM-MESSAGEID: 1710462931424100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Signed-off-by: Stefano Stabellini Acked-by: Bertrand Marquis --- Changes in v3: - better clarify what is allowed and not allowed with examples --- docs/misra/rules.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index 1e134ccebc..5766b2286d 100644 --- a/docs/misra/rules.rst +++ b/docs/misra/rules.rst @@ -181,6 +181,21 @@ maintainers if you want to suggest a change. headers (xen/include/public/) are allowed to retain longer identifiers for backward compatibility. =20 + * - `Rule 5.5 `_ + - Required + - Identifiers shall be distinct from macro names + - Macros expanding to their own name are allowed, e.g.:: + + #define x x + + Clashes between names of function-like macros and identifiers of + non-callable entities are allowed. Callable entities having an + identifier that is the same of the name of a + function-like macro are not allowed. Example (not allowed):: + + #define f(x, y) f(x, y); + void f(int x, int y); + * - `Rule 5.6 `_ - Required - A typedef name shall be a unique identifier --=20 2.25.1