MIPS: Watch: Avoid duplication of bits in mips_read_watch_registers
authorMatt Redfearn <matt.redfearn@mips.com>
Tue, 2 Jan 2018 11:31:22 +0000 (11:31 +0000)
committerJames Hogan <jhogan@kernel.org>
Tue, 23 Jan 2018 15:46:01 +0000 (15:46 +0000)
commit705e71ad70c24b5fea4db1234d20d0bbff5491eb
tree843586311fe7c6f93bd60c6a49fdfe06df2b4312
parentf609cc3a2000d3a14ac52e5c8db7b6fdb6c16353
MIPS: Watch: Avoid duplication of bits in mips_read_watch_registers

Currently the bits to be masked when watchhi is read is defined inline
for each register. To avoid this, define the bits once and mask each
register with that value.

Signed-off-by: Matt Redfearn <matt.redfearn@mips.com>
Acked-by: David Daney <david.daney@cavium.com>
Reviewed-by: James Hogan <jhogan@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/18158/
Signed-off-by: James Hogan <jhogan@kernel.org>
arch/mips/kernel/watch.c