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

Re: [PATCH] xen/arm: efi-boot misra rule 4.1 fix


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 9 Dec 2022 10:04:17 +0100
  • 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=1ZTMm8FnIb7IyS1Qz5SW8sEglnaz/WvcoZ5DWb/SS20=; b=CM5EiifIOcAwkeu0NpTRjMGwMx9zleaAFx/1f35nlUa6047uMbtVTyEJVQ6j1JSJQTK4mpHAQfzUNmTti9mBauJPl+kL+PrH7WU6HRFH5PPMGjJBIo/hyJu/aUh5bd2NZ/Drb7AN2qssTylFV17M9H53zVUzaEvh12+IRTvdbW9rYKH5ZO5ayPAU3Xxo4qJNgMn7C6gVUvGJVGgJXiD3dszBbLYN0ZZ9lFyOaPvWWq2mwzvzAEh/VkgIL25gbz79ykHjavcgJyu3UTbBcLc7Np3od/duNve4Lcdw26a/+XWRNPbG/OU/nlOQg+/FFg9ruhQyvaNuVIWRd5c+Bjr4Iw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kuwrxz+0D01L1x10kYHDWwTu1miBKPFJ6S45OqVZ9c0tPBwD3VYgHJ2NEHyzYp6xcVqIRmLrhI8Aa2o2b58BndHFaDFUUewQ7SeK8Hit/yzUPTHhR/PZN1xDSgzK5DsIZ+vL0/9m9nczNmww06bRjI6bMMX1sy1tLcdTiufzjXLuLWtFFAqOWIPXNxYag+H+ttfhV3aesoMRqmgwOsoUQqa9JhxbhUhxsKvea8xsRrZ16AvrMspFaBryMRPTYFzrPiT4ZaBSTHVRDrAfn08O4Eol3Gf30ps8N9Yse+eOKtrl/0AOfsJ7BSa/8hBR78UhqhqYzitbdwlaQ69cQ+JvrQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Volodymyr_Babchuk@xxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, julien@xxxxxxx, bertrand.marquis@xxxxxxx
  • Delivery-date: Fri, 09 Dec 2022 09:04:29 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 09.12.2022 01:41, Stefano Stabellini wrote:
> We have 3 violations of MISRA C Rule 4.1 ("Octal and hexadecimal escape
> sequences shall be terminated") in xen/arch/arm/efi/efi-boot.h. Fix
> them.
> 
> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx>

While I certainly agree, I wonder if you don't want to correct style
(missing blank line after every one of these declarations) as well as
data placement (all three should imo be static __initconst) at the
same time.

Jan

> --- a/xen/arch/arm/efi/efi-boot.h
> +++ b/xen/arch/arm/efi/efi-boot.h
> @@ -542,7 +542,7 @@ static void __init efi_arch_handle_module(const struct 
> file *file,
>  
>      if ( file == &ramdisk )
>      {
> -        char ramdisk_compat[] = "multiboot,ramdisk\0multiboot,module";
> +        char ramdisk_compat[] = "multiboot,ramdisk\0" "multiboot,module";
>          node = fdt_add_subnode(fdt, chosen, "ramdisk");
>          if ( node < 0 )
>              blexit(L"Unable to add ramdisk FDT node.");
> @@ -555,7 +555,7 @@ static void __init efi_arch_handle_module(const struct 
> file *file,
>      }
>      else if ( file == &xsm )
>      {
> -        char xsm_compat[] = "xen,xsm-policy\0multiboot,module";
> +        char xsm_compat[] = "xen,xsm-policy\0" "multiboot,module";
>          node = fdt_add_subnode(fdt, chosen, "xsm");
>          if ( node < 0 )
>              blexit(L"Unable to add xsm FDT node.");
> @@ -568,7 +568,7 @@ static void __init efi_arch_handle_module(const struct 
> file *file,
>      }
>      else if ( file == &kernel )
>      {
> -        char kernel_compat[] = "multiboot,kernel\0multiboot,module";
> +        char kernel_compat[] = "multiboot,kernel\0" "multiboot,module";
>          node = fdt_add_subnode(fdt, chosen, "kernel");
>          if ( node < 0 )
>              blexit(L"Unable to add dom0 FDT node.");
> 




 


Rackspace

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