Aryan Arora has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/80185?usp=email )
Change subject: src/device/oprom/include/x86emu/regs.h: Fix checkpatch errors Add space after keywords, scope with a do-while loop for a multiline macro and split a single line if-else to multiline. ......................................................................
src/device/oprom/include/x86emu/regs.h: Fix checkpatch errors Add space after keywords, scope with a do-while loop for a multiline macro and split a single line if-else to multiline.
Change-Id: Ia66aed706469c9f077a1d5eb6b4af662341c913c Signed-off-by: Aryan Arora aryanarora.w1@gmail.com --- M src/device/oprom/include/x86emu/regs.h 1 file changed, 7 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/85/80185/1
diff --git a/src/device/oprom/include/x86emu/regs.h b/src/device/oprom/include/x86emu/regs.h index 52f599d..dd3ffaa 100644 --- a/src/device/oprom/include/x86emu/regs.h +++ b/src/device/oprom/include/x86emu/regs.h @@ -206,8 +206,13 @@ #define ACCESS_FLAG(flag) (M.x86.R_FLG & (flag)) #define CLEARALL_FLAG(m) (M.x86.R_FLG = 0)
-#define CONDITIONAL_SET_FLAG(COND,FLAG) \ - if (COND) SET_FLAG(FLAG); else CLEAR_FLAG(FLAG) +#define CONDITIONAL_SET_FLAG(COND, FLAG) \ + do { \ + if (COND) \ + SET_FLAG(FLAG); \ + else \ + CLEAR_FLAG(FLAG) \ + } while (0)
#define F_PF_CALC 0x010000 /* PARITY flag has been calced */ #define F_ZF_CALC 0x020000 /* ZERO flag has been calced */