xen/arm: regs: Fix MISRA C 2012 Rule 20.7 violation

In macro psr_mode(), the macro parameter 'm' is used as expression and
therefore it is good to be enclosed in parentheses to prevent against
unintended expansions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Rahul Singh <rahul.singh@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
This commit is contained in:
Xenia Ragiadakou authored and Stefano Stabellini committed 2022-08-09 14:47:47 -07:00
1 parent e83cd54611
commit ea2353a7fb
1 file changed
+1 -1
+1 -1
View File
@@ -11,7 +11,7 @@
#include <asm/current.h>
#include <asm/processor.h>
#define psr_mode(psr,m) (((psr) & PSR_MODE_MASK) == m)
#define psr_mode(psr,m) (((psr) & PSR_MODE_MASK) == (m))
static inline bool regs_mode_is_32bit(const struct cpu_user_regs *regs)
{
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.