All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] xen/arm: gnttab: macros modifications
@ 2022-05-05 10:35 Michal Orzel
  2022-05-05 10:36 ` [PATCH 1/2] xen/arm: gnttab: use static inlines for gnttab_{release_}host_mapping* Michal Orzel
  2022-05-05 10:36 ` [PATCH 2/2] xen/arm: gnttab: modify macros to evaluate all arguments and only once Michal Orzel
  0 siblings, 2 replies; 12+ messages in thread
From: Michal Orzel @ 2022-05-05 10:35 UTC (permalink / raw)
  To: xen-devel
  Cc: Stefano Stabellini, Julien Grall, Bertrand Marquis, Volodymyr Babchuk

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



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-05-06 10:02 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-05 10:35 [PATCH 0/2] xen/arm: gnttab: macros modifications Michal Orzel
2022-05-05 10:36 ` [PATCH 1/2] xen/arm: gnttab: use static inlines for gnttab_{release_}host_mapping* Michal Orzel
2022-05-05 11:13   ` Jan Beulich
2022-05-06  7:27     ` Michal Orzel
2022-05-06  9:56       ` Julien Grall
2022-05-06 10:01         ` Michal Orzel
2022-05-06  9:57       ` Jan Beulich
2022-05-05 10:36 ` [PATCH 2/2] xen/arm: gnttab: modify macros to evaluate all arguments and only once Michal Orzel
2022-05-05 11:20   ` Jan Beulich
2022-05-05 11:25     ` Michal Orzel
2022-05-05 11:55       ` Jan Beulich
2022-05-05 20:34         ` Stefano Stabellini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.