arc: if printk is disabled, do not set variables

if printk is disabled, the variables will be unused and we will
get compiler warning.

Change-Id: I5dad791ae89d7a8c98f9e4660da472ef0caacc92
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2015-09-17 22:51:21 -04:00
commit 66b55a3f7c

View file

@ -73,6 +73,7 @@
void _FaultDump(const NANO_ESF *esf, int fault)
{
ARG_UNUSED(esf);
#ifdef CONFIG_PRINTK
uint32_t exc_addr = _arc_v2_aux_reg_read(_ARC_V2_EFA);
uint32_t ecr = _arc_v2_aux_reg_read(_ARC_V2_ECR);
@ -81,6 +82,7 @@ void _FaultDump(const NANO_ESF *esf, int fault)
_ARC_V2_ECR_CODE(ecr),
_ARC_V2_ECR_PARAMETER(ecr));
PR_EXC("Address 0x%x\n", exc_addr);
#endif
}
#endif /* CONFIG_FAULT_DUMP */