提交 4abc7ebf 编写于 作者: P Peter Chubb 提交者: Andrzej Zaborowski

Fix hw_error messages from arm_timer.c

Two of the calls to hw_error() in arm_timer.c contain the wrong function name.

As suggested by Andreas Färber, use the C99 standard __func__ macro to
get the correct name, instead of putting the name directly into the code.
Signed-off-by: NPeter Chubb <peter.chubb@nicta.com.au>
Signed-off-by: NAndrzej Zaborowski <andrew.zaborowski@intel.com>
上级 eb5d5bea
...@@ -61,7 +61,7 @@ static uint32_t arm_timer_read(void *opaque, target_phys_addr_t offset) ...@@ -61,7 +61,7 @@ static uint32_t arm_timer_read(void *opaque, target_phys_addr_t offset)
return 0; return 0;
return s->int_level; return s->int_level;
default: default:
hw_error("arm_timer_read: Bad offset %x\n", (int)offset); hw_error("%s: Bad offset %x\n", __func__, (int)offset);
return 0; return 0;
} }
} }
...@@ -128,7 +128,7 @@ static void arm_timer_write(void *opaque, target_phys_addr_t offset, ...@@ -128,7 +128,7 @@ static void arm_timer_write(void *opaque, target_phys_addr_t offset,
arm_timer_recalibrate(s, 0); arm_timer_recalibrate(s, 0);
break; break;
default: default:
hw_error("arm_timer_write: Bad offset %x\n", (int)offset); hw_error("%s: Bad offset %x\n", __func__, (int)offset);
} }
arm_timer_update(s); arm_timer_update(s);
} }
...@@ -270,7 +270,7 @@ static uint64_t icp_pit_read(void *opaque, target_phys_addr_t offset, ...@@ -270,7 +270,7 @@ static uint64_t icp_pit_read(void *opaque, target_phys_addr_t offset,
/* ??? Don't know the PrimeCell ID for this device. */ /* ??? Don't know the PrimeCell ID for this device. */
n = offset >> 8; n = offset >> 8;
if (n > 2) { if (n > 2) {
hw_error("sp804_read: Bad timer %d\n", n); hw_error("%s: Bad timer %d\n", __func__, n);
} }
return arm_timer_read(s->timer[n], offset & 0xff); return arm_timer_read(s->timer[n], offset & 0xff);
...@@ -284,7 +284,7 @@ static void icp_pit_write(void *opaque, target_phys_addr_t offset, ...@@ -284,7 +284,7 @@ static void icp_pit_write(void *opaque, target_phys_addr_t offset,
n = offset >> 8; n = offset >> 8;
if (n > 2) { if (n > 2) {
hw_error("sp804_write: Bad timer %d\n", n); hw_error("%s: Bad timer %d\n", __func__, n);
} }
arm_timer_write(s->timer[n], offset & 0xff, value); arm_timer_write(s->timer[n], offset & 0xff, value);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册