]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
retpoline: add brackets to check_ibrs_inuse() and clear_ibpb_inuse()
authorChuck Anderson <chuck.anderson@oracle.com>
Mon, 26 Feb 2018 08:20:30 +0000 (00:20 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Sat, 3 Mar 2018 01:58:26 +0000 (17:58 -0800)
Add brackets to the "else" clause in both check_ibrs_inuse() and
clear_ibpb_inuse() to match indentations.  The brackets are not
required but may prevent a bug when indented code is mistakenly added
without adding brackets.

Orabug: 27625404
Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
arch/x86/include/asm/spec_ctrl.h

index 91465ba903e02e8951777078ebdb773e4e4c63b0..963a382b82f038fb800c0f1488a13b9d4cf4e999 100644 (file)
@@ -235,11 +235,12 @@ static inline void clear_ibrs_inuse(void)
 
 static inline int check_ibrs_inuse(void)
 {
-       if (use_ibrs & SPEC_CTRL_IBRS_INUSE)
+       if (use_ibrs & SPEC_CTRL_IBRS_INUSE) {
                return 1;
-       else
+       } else {
                /* rmb to prevent wrong speculation for security */
                rmb();
+       }
        return 0;
 }
 
@@ -308,11 +309,12 @@ static inline void clear_ibpb_inuse(void)
 
 static inline int check_ibpb_inuse(void)
 {
-       if (use_ibpb & SPEC_CTRL_IBPB_INUSE)
+       if (use_ibpb & SPEC_CTRL_IBPB_INUSE) {
                return 1;
-       else
+       } else {
                /* rmb to prevent wrong speculation for security */
                rmb();
+       }
        return 0;
 }