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 <[email protected]> > Reviewed-by: Jan Beulich <[email protected]>
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
