From nobody Fri May 17 07:07:52 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=1688683615; cv=none; d=zohomail.com; s=zohoarc; b=idi0tAL1mSek5V7dF2E+HhH/sDDD58F7pkDWJkfsevRoubcAfcpH9yEpxM+RcgCtRm32+Z7wpB+pfqp7rAMOFayS2wjxRBAtMaamM07rVCqFfMhjAfKEEBCyjK1ptMGEBZUgOkxG2GsBK35T3WlcQ9U+jctAVtuVE2a6c9F+IiY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1688683615; 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=jmQnwF/WgIM66lEJR6tLJERKiPj77R55IdDWWt4/X8g=; b=Mrsf7/cGSpbYjtqerbzbmOgH1ltLROovNtieqNTYBsQIIZGqtYiZNwczFkQ4/eTgScGUvVcOzva9UOX9WWtUEhR4QFr1tsmf6FoxPjz3zops8QSbUSzthpaA7Tl0B4AfxEhtvNxbKZDm0eOd1BYu2/S95ZWxss/6lKrAMahnWGA= 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 1688683615255363.7797025888923; Thu, 6 Jul 2023 15:46:55 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.560104.875744 (Exim 4.92) (envelope-from ) id 1qHXk4-0008SV-U4; Thu, 06 Jul 2023 22:46:28 +0000 Received: by outflank-mailman (output) from mailman id 560104.875744; Thu, 06 Jul 2023 22:46:28 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qHXk4-0008SO-Ra; Thu, 06 Jul 2023 22:46:28 +0000 Received: by outflank-mailman (input) for mailman id 560104; Thu, 06 Jul 2023 22:46:28 +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 1qHXk4-0008SG-6b for xen-devel@lists.xenproject.org; Thu, 06 Jul 2023 22:46:28 +0000 Received: from dfw.source.kernel.org (dfw.source.kernel.org [2604:1380:4641:c500::1]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id efa67aa6-1c4e-11ee-8611-37d641c3527e; Fri, 07 Jul 2023 00:46:25 +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 7A86260D2E; Thu, 6 Jul 2023 22:46:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A6D52C433C7; Thu, 6 Jul 2023 22:46:22 +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: efa67aa6-1c4e-11ee-8611-37d641c3527e DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688683583; bh=Vd2StGY3QLHbG5ajXmHSkNw/fN1H9V5IpfNUtQM6kgU=; h=From:To:Cc:Subject:Date:From; b=AydGXQcT2Z4I3TisHEC4uplAYU8S8tAiZ5UP2msFzmFTpSreLhZVy4d7c2rE0ZiO6 YODxqEG+bqMUtTV+47y02m60avcbl1n2eLD0KH2/b0TUSw3a6Idl221Aq/nH4iKkaY TJCCYYHj1zptHdu2z7gLZ3FM7U45n0f7JJIQDlzuPcDgJekerih0ETmW8fRSDNUeUQ hAgMzVZDTXGw+OZB2ZX6Xx08UCn/Oq0LLpyJceA7GcGWgRC/fcFWDXNNk+GavMGHLf L7RcgxtzjY0dgYFG6EI+jcLwXBrWM68SA0H/U5UGaIwHAAZ6s5F5Gacw0FwPKJ5Gqd Cgj9zu6yXQbNg== 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] docs/misra: add Rule 7.4 and 9.4 Date: Thu, 6 Jul 2023 15:46:19 -0700 Message-Id: <20230706224619.1092613-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: 1688683616586100001 Content-Type: text/plain; charset="utf-8" From: Stefano Stabellini Rule 9.4 is non-controversial and we have no violations. Rule 7.4 is considered a good idea with the caveat that assigning a string literal to const void is allowed. I added a note to specify it. Signed-off-by: Stefano Stabellini --- docs/misra/rules.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index 622f35410c..986d031786 100644 --- a/docs/misra/rules.rst +++ b/docs/misra/rules.rst @@ -203,6 +203,13 @@ maintainers if you want to suggest a change. - The lowercase character l shall not be used in a literal suffix - =20 + * - `Rule 7.4 `_ + - Required + - A string literal shall not be assigned to an object unless the + objects type is pointer to const-qualified char + - Assigning a string literal to any object with type + "pointer to const-qualified void" is allowed + * - `Rule 8.1 `_ - Required - Types shall be explicitly specified @@ -275,6 +282,11 @@ maintainers if you want to suggest a change. braces - =20 + * - `Rule 9.4 `_ + - Required + - An element of an object shall not be initialized more than once + - + * - `Rule 12.5 `_ - Mandatory - The sizeof operator shall not have an operand which is a function --=20 2.25.1