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

Re: [XEN PATCH v2] x86/mm: address violations of MISRA C:2012 Rules 8.2 and 8.3


  • To: Federico Serafini <federico.serafini@xxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Fri, 4 Aug 2023 10:47:39 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=m42IxxKuaIjFxMFD8EVIAdcRbjt+Je7k+U+X6RhFZRI=; b=e7VQ9v251Y914KzdekwRqZMrbvnsz6K+zJzyEHt+CVGPFdbssXPsSZsIMqJKWQLu+XSOO4XqpVf9EzGoudLoRWz7PBiiI/OERED4qbLrohIxMwg4kxCW1AHJKtc96jCW0q6hMYXbaCp5NAajkyHw0/D/Xa6xJECx9FjROmRugWwtTeWl9Co6DQeRQiUWYo3YOFpbuYHktM2mrcu68tSd2zJ74+RJQZIEFxJeOonuxAGTA/oRcIqFH3isqwqW8LhQd0t93MltbWf2zw659rfQdsUO+JG1ho/7IlbiKGbdsykxxwiHu2zi5Sf982xtM4Nh30EgMzhZZVa/ITzNSsqNOg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mqg8IsBbSeyCIjOiZV5aNqnkXAlfz08ZHHZB+rSBGFP0jT1JBZ+w++wgGOXQ9Mu/t5ydidvFgROBEW94SyMquqcGHOMRhmEkLPyVHbTiJBNxneRGmjOuZSe+CUhbSs/pHoADNX27G2l76TBS3KEhbB776zoYUeHX7p2LwWbL5anIe20vCDTd/4/Nt1VqN/BdEvLluLIn59b2ZeqqzMk4tf9aUTfYk5oOhWGWyuhPUqHUfllkS5L2XxsbfxEkVTycAXdI2l3OeRwOQaXO9mDXvA7b8FHNJS5qkYI3Rz2Fwf6Oay2b9DYlPwnMVY7Gdi1qo1ymlE5kNZ11D7L4/aiiaw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: consulting@xxxxxxxxxxx, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Fri, 04 Aug 2023 09:47:58 +0000
  • Ironport-data: A9a23:Xr6hH6+vzBnkYqHdNu2RDrUDWn+TJUtcMsCJ2f8bNWPcYEJGY0x3z TQcCDuEa/iONmCnLYojYdvj8kwF7ZGGyYVrTAJppXg8E34SpcT7XtnIdU2Y0wF+jCHgZBk+s 5hBMImowOQcFCK0SsKFa+C5xZVE/fjUAOG6UKicYXoZqTZMEE8JkQhkl/MynrlmiN24BxLlk d7pqojUNUTNNwRcawr40Ird7ks21BjOkGlA5AdmNagX5Aa2e0Q9V/rzG4ngdxMUfaEMdgKKb 76r5K20+Grf4yAsBruN+losWhRXKlJ6FVHmZkt+A8BOsDAbzsAB+v9T2M4nQVVWk120c+VZk 72hg3ASpTABZcUgkMxFO/VR/roX0aduoNcrKlDn2SCfItGvn9IBDJyCAWlvVbD09NqbDklj7 v07LRQMVSqpoLqR/oiVddNqn9gseZyD0IM34hmMzBn/JNN/G9XvZvuP4tVVmjAtmspJAPDSI dIDbiZiZwjBZBsJPUoLDJU5n6GjgXyXnz9w8QrJ4/ZopTWCilUuiNABM/KMEjCObexTklyVu STt+GPhDwtBHNee1SCE4jSngeqncSbTAdhLTeHgp6E66LGV7nQJEjokBAu3mtuG2hShV4xwM 04f6gN7+MDe82TuFLERRSaQrnOIswQdUN0WCOAg4Q+MzKv86RuWHWUCQXhKb9lOnN87Q3km2 0GEm/vtBCdzq/uFRHSF7LCWoDiufy8PIgcqbigCVhYB/9jlr6k5kx3UQ9BsVqWyi7XdGzv93 jSLpygWnKgIgIgA0KDT1U/DqyKhoN7OVAFd2+nMdmes7wc8aIv7YYWtsALf9awZc97fSUSdt n8ZncTY9PoJEZyGiC2KRqMKAa2t4PGGdjbbhDaDAqUcythkwFb7Fag43d20DB4B3hosEdMxX HLuhA==
  • Ironport-hdrordr: A9a23:JhlGR6rm8rbQmxH7LLN9GjgaV5ooeYIsimQD101hICG9E/bo9P xG+c5x6faaslwssQ4b6Le90cW7LU80jKQFhbX5Xo3DYOCFggaVxehZhOPfK1eKIVyaygc678 hdmsNFaeEYY2IVsS6WizPIceod/A==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 04/08/2023 10:38 am, Federico Serafini wrote:
> diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
> index be2b10a391..e1d9b94007 100644
> --- a/xen/arch/x86/mm.c
> +++ b/xen/arch/x86/mm.c
> @@ -5591,7 +5591,7 @@ int __init populate_pt_range(unsigned long virt, 
> unsigned long nr_mfns)
>   *
>   * It is an error to call with present flags over an unpopulated range.
>   */
> -int modify_xen_mappings(unsigned long s, unsigned long e, unsigned int nf)
> +int modify_xen_mappings(unsigned long s, unsigned long e, unsigned int flags)

I think both of these examples want to stay as nf (new flags).  Flags on
its own is ambiguous in context, and nf is a common shorthand in our
pagetable code.

And it will make the patch rather shorter.

~Andrew



 


Rackspace

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