[PATCH 0/2] xen/arm: gnttab: macros modifications

Michal Orzel posted 2 patches 2 weeks, 4 days ago
Test gitlab-ci failed
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20220505103601.322110-1-michal.orzel@arm.com
xen/arch/arm/include/asm/grant_table.h | 80 +++++++++++++++++++-------
1 file changed, 59 insertions(+), 21 deletions(-)
[PATCH 0/2] xen/arm: gnttab: macros modifications
Posted by Michal Orzel 2 weeks, 4 days ago
This patch series modifies macros inside xen/arch/arm/include/asm/grant_table.h
to be resistant to static analyzer/compiler warnings about unused-but-set
variables.

The first patch acts as a fix for a gcc warning when -Wunused-but-set-variable
flag is enabled by converting the macro to static inline helper. The
adjacent macro is modified as well. These macros can be converted to inline
helpers as they do not take argument of type struct grant_table which is not
fully defined yet.

The second patch modifies the remaining macros to evaluate all their arguments
and only once.

Previous discussion:
https://www.mail-archive.com/xen-devel@lists.xenproject.org/msg119708.html

Michal Orzel (2):
  xen/arm: gnttab: use static inlines for gnttab_{release_}host_mapping*
  xen/arm: gnttab: modify macros to evaluate all arguments and only once

 xen/arch/arm/include/asm/grant_table.h | 80 +++++++++++++++++++-------
 1 file changed, 59 insertions(+), 21 deletions(-)

-- 
2.25.1