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

Re: [XEN PATCH v2] xen/domain_page: address violations of MISRA C:2012 Rule 8.3


  • To: Federico Serafini <federico.serafini@xxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 31 Oct 2023 11:31:21 +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=bn5zbQ057cednY7dro7pNMDRXidD+HcvHCt1RMvGwXE=; b=Dw/Vblws6K4ARoNQlA+GZ6fJmeci59bYo/fiyX4wftO2UsLDQoGwZk2CibUarDVdAoMs8WItida07WVjFa5RhJfsgf2t5qqbHToWutYw722TDEZwacSsFPhgLGtqp4LnAA88VcAQXdEZkfgh4nuRmsDS03ClKUaup5w8aIk/bn5BIIbIQsVkoIiXLt/oVFL9p1RPIgAtL+JVMzgGe89PjNRii4DTJ5ec/gW6tnTpStBeQ5pT19BRCAlc3HRkrLFN+DOUURvSBgawdDYhfEZeTsEMOc9cVIx19k0dm3iWOJ9d7wnebuOGRr6uzPlZt1SKFJWLt/cb9Sl9vXD75duRsw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UUPMtFkZRtr3VElYj0OV2MUCQHij77nau3xThWUxIWJd/kgliv5BpFIPcWzjEAil8XJZt/iBd5iEITSbpreRp7OB6AoHOzbr+KybP89wW44SJvj7TDUa0N1sXgPI3Sh1/FLUCVBXRJyV2ei//DVBiCTVSegsg+7qetA/PgGTa23ObtWJwanVUTiyoZ92lijT1xTuGbZjFdE4ZSmP9gpFKYCRyb/KTjUDkQpBiDLZpnqcjyYd/uO/KjOiXpwkvhqpUwqxmDoVfyZFSc6nujzmJJt8EcL9/esrO8q7vPd6/d79YxAlvztmK6hevozd/3AXDhrJ7MpUfemost7YrECIKg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: consulting@xxxxxxxxxxx, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 31 Oct 2023 10:31:31 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 31.10.2023 10:25, Federico Serafini wrote:
> Make function defintions and declarations consistent.
> No functional change.
> 
> Signed-off-by: Federico Serafini <federico.serafini@xxxxxxxxxxx>

Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

However, ...

> ---
> Changes in v2:
> - use 'ptr' do denote a const void * parameter.

... not even this (let alone the description) clarifies what the
inconsistency was. I had to go check to figure that x86 already uses
"ptr". Such things could do with spelling out.

> @@ -55,8 +55,8 @@ static inline void *__map_domain_page_global(const struct 
> page_info *pg)
>  
>  #define map_domain_page(mfn)                __mfn_to_virt(mfn_x(mfn))
>  #define __map_domain_page(pg)               page_to_virt(pg)
> -#define unmap_domain_page(va)               ((void)(va))
> -#define domain_page_map_to_mfn(va)          _mfn(__virt_to_mfn((unsigned 
> long)(va)))
> +#define unmap_domain_page(ptr)               ((void)(ptr))
> +#define domain_page_map_to_mfn(ptr)          _mfn(__virt_to_mfn((unsigned 
> long)(ptr)))

Padding wants to not be screwed by the change (one of the blanks will
want dropping). I guess this can be taken care of while committing.

Jan



 


Rackspace

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