ARM: hw_breakpoint: fix warnings generated by sparse
authorWill Deacon <will.deacon@arm.com>
Mon, 29 Nov 2010 17:06:53 +0000 (17:06 +0000)
committerWill Deacon <will.deacon@arm.com>
Mon, 6 Dec 2010 11:55:57 +0000 (11:55 +0000)
commit4a55c18e2023096c8684fae5fa1cfa96a03172ff
treed97cd84ed4c91eae3876aabd919cc1ddcc7505de
parentce9b1b09520789223f72a9fefd5f0e329f8d89d0
ARM: hw_breakpoint: fix warnings generated by sparse

sparse doesn't like per-cpu accesses such as:

static DEFINE_PER_CPU(struct perf_event *, foo[MAXLEN]);
struct perf_event **bar = __get_cpu_var(foo);

and shouts quite loudly about it:

| warning: incorrect type in assignment (different modifiers)
|    expected struct perf_event **slots
|    got struct perf_event *[noderef] *<noident>

This patch adds casts to these sorts of assignments in hw_breakpoint.c
in order to silence the warnings.

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm/kernel/hw_breakpoint.c