arch: x86: Use macro BIT to shift bits

The operation was shifiting bit using a signed constant in the left
operand. Use BIT macro to do it properly.

MISRA-C rule 12.2

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2018-12-04 16:16:06 -08:00 committed by Andrew Boie
commit 0ed0d164ef

View file

@ -231,7 +231,7 @@ static FUNC_NORETURN void generic_exc_handle(unsigned int vector,
printk("CPU exception %d\n", vector);
break;
}
if ((1 << vector) & _EXC_ERROR_CODE_FAULTS) {
if (BIT(vector) & _EXC_ERROR_CODE_FAULTS) {
printk("***** Exception code: 0x%x\n", pEsf->errorCode);
}
_NanoFatalErrorHandler(_NANO_ERR_CPU_EXCEPTION, pEsf);