[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] misra: add R14.4 R21.1 R21.2


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 26 Oct 2023 08:59:54 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • 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=jwRENgDoaudvlm9RedMCBNrIsbxN/q8CsM7rcTpx0d8=; b=eJVta3TgOyhoH/NRfq3IaR0n8iltLfFtesucQMiryQ+36b2Ub76hiNJN0nRXE+LMRZ/m/3S7FHEFRKfkUZMFvAP1P4brc4M5G8meOeAA4RetYdI4DEse2s/fEQ0B0++mnoD0LpGTdonOGo0fH70SvCb7PLJaQuo16F6AfHwNPgW2w5kHNPPAw+adelS3d2vNHhLBIHZVIiAC21+gpQBNN4Nu4BL0EERVoAUkvlAg9E5i1jd2r/w40QaFyUkpKTqa5eZ7S3Dp7MzC5C0H8iw14wKBUGqJH+TnzlX95qkYi9Jgff93jTXNi/GdKw0c7gl7OGf1yspQIsnqI/XU3wtG+g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jygDBIWgNztLvu0DLqlNI22lb0+KS99lddalB5RyqhlIdm88qwQlKc+7pLof4quB6DD5U0VRvexxhlSpwGERaTZqsHtv0IemWaMzskiHj7qj7tOd9JUGLJYTvLtj/ut6RrU8SECVXt3/w6mQXTmRe1UP0iVf7gmAIv/m96vyylyeNnRtXHPkFqm6sEEfUuFblO4j2BQTMFMDbxFiWF6kEjv0d4KBIEhPTCEgqhPZ0h4jYQVxQSB//eM+NjPdIa5gBjxIng8Jb1ctZbnhs2uzXGE9AUjKhxb5rBMyfKpfv6xooafnNt+d+a3Xh609iE32XEer9csjf9WVinsVj04CnQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: julien@xxxxxxx, bertrand.marquis@xxxxxxx, andrew.cooper3@xxxxxxxxxx, roger.pau@xxxxxxxxxx, george.dunlap@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 26 Oct 2023 07:00:10 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 26.10.2023 03:16, Stefano Stabellini wrote:
> On Wed, 25 Oct 2023, Jan Beulich wrote:
>> On 25.10.2023 03:15, Stefano Stabellini wrote:
>>> And if we can find a clear general comment about the usage of leading
>>> underscores in Xen I am happy to add it too (e.g. header guards), but
>>> from MISRA point of view the above is sufficient.
>>
>> But what we need isn't a description of the status quo, but one of
>> what state we want to (slowly) move to. The status quo anyway is
>> "no pattern, as in the past hardly anyone cared".
> 
> I guess you are suggesting something more like the following, but please
> feel free to suggest your favorite wording (it might be easier for me to
> understand what you mean if you provide a short example).
> 
> ---
> All identifiers starting with an underscore are reserved and should not
> be used.

Again, no. Identifiers starting with an underscore followed by another
underscore or an upper-case letter are reserved. Other identifiers are
dedicated for a particular purpose, and are fine to use for (at least)
that purpose.

> Today Xen uses many, such as header guards and bitwise
> manipulation functions. Upon analysis it turns out Xen identifiers do
> not clash with the identifiers used by modern GCC, but that is not a
> guarantee that there won't be a naming clash in the future or with
> another compiler. For these reasons we discourage the introduction of
> new reserved identifiers in Xen, and we see it as positive the reduction
> of reserved identifiers. At the same time, certain identifiers starting
> with an underscore are also commonly used in Linux (e.g. __set_bit) and
> we don't think it would be an improvement to rename them.

Everything else reads okay-ish to me.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.