Hi Jan, On 27.04.2022 11:59, Jan Beulich wrote: > On 27.04.2022 11:49, Michal Orzel wrote: >> Function unmap_common_complete 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 this by removing ld and directly passing current->domain >> to gnttab_host_mapping_get_page_type. > > I think we want to retain the ld / rd notation. Therefore I think it's > rather the Arm macro which wants adjusting to not leave this argument > unused. > I would agree provided that the ld variable was used in more than one place. As it is not, it does not seem very beneficial to keep a variable that is used just in one place and stores the macro value.
When it comes to gnttab_host_mapping_get_page_type macro, on Arm it is defined as (0) so modifying it seems to be a quite big overhead. > Jan > Cheers, Michal