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

Re: [PATCH v2 1/2] xen/arm: gnttab: use static inlines for gnttab_{release_}host_mapping*


  • To: Michal Orzel <michal.orzel@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 6 May 2022 12:03:22 +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=Vcus4KzsWrufXtEPEasfCu5qSPVsJwNNR29zq4QtvhQ=; b=XlqF+ahUNi9dve6VBtQUKf3dnWJGyl+f66jHv6/AKg9HVBEeVmQ/AOxb3158qBrxth+puAf2cV+UiTIbfzTkDsiSxV3F62nHZpWOUSF0u90OfCy57L2lHBvYYAtFZnI/aKSDMSqkOK9NZ7PFXhxRhmHP+dquiPbBx3pq/CLcmA7QWwO5qFgNUGlKZiixOevi8ISbizFMIDuseaIKuRPbFCgxdeoMUIamfnmHiJpTRG5xBKnSnEMLw2Lwtt94uLh+HGfXXbLdNSoCiyqg/1xIg2lvhkfr0rrAVUaM82ZhXQI8DRpF0VIrDygiI0rvb0cfK1rke8dEAi+edq0T7kLaGg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QjON0tRISC64XJxAO161hFdsL8HWR/2oixp/+9O6gdiM9dqCpO+xdz4lijom6i4nhUhqpiW/DsOs3qG1nb6JqPop10vYj84XE2Wcll6sNbfghbEqpjWpCAMTQODcBm3m59YyWIGNHyxJjuXIWOzINhWOu96le636R3MoLJu748Rq91QOkhFJr7YGk4kEY8BsbWsdGsWuwcKl/ceLUhYcxZRXBA/s/8nhhJUzDEqdLduhFU99jR9ZkcolfZIrzutOSKscCjagAVnFvMviv2q5RITo7wm4UGjHOtjQdejuBhwGUYoylBSnz8T7ZIvgJ4R+5SJT8X9MB++CUh6TSygbQw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 06 May 2022 10:03:33 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 06.05.2022 11:42, Michal Orzel wrote:
> Function unmap_common_complete (common/grant_table.c) defines and sets
> a variable ld that is later on passed to a macro:
> gnttab_host_mapping_get_page_type().
> On Arm this macro does not make use of any arguments causing a compiler
> to warn about unused-but-set variable (when -Wunused-but-set-variable
> is enabled). Fix it by converting this macro to a static inline
> helper and using the boolean return type.
> 
> While there, also convert macro gnttab_release_host_mappings.
> 
> Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

This R-b applies only ...

> --- a/xen/arch/arm/include/asm/grant_table.h
> +++ b/xen/arch/arm/include/asm/grant_table.h
> @@ -29,12 +29,22 @@ static inline void gnttab_mark_dirty(struct domain *d, 
> mfn_t mfn)
>  #endif
>  }
>  
> +static inline bool gnttab_host_mapping_get_page_type(const bool ro,

... with this const dropped again. As said elsewhere, while not
technically wrong we don't normally do so elsewhere, and this ends
up inconsistent with ...

> +                                                     const struct domain *ld,
> +                                                     const struct domain *rd)

... there being just a single const here.

Jan




 


Rackspace

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