]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: KVM: Refactor added offsetof()s
authorJames Hogan <james.hogan@imgtec.com>
Wed, 16 Dec 2015 23:49:31 +0000 (23:49 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Sun, 24 Jan 2016 02:14:15 +0000 (03:14 +0100)
commit534c04a983ff8c2a6d46cc879dd0c58633fe37fc
tree9b0c58284ca2585eae5a3d3d07b06be9b5722523
parent92d51bd96585a236bdaee14b688263e4bcc8e6c4
MIPS: KVM: Refactor added offsetof()s

When calculating the offsets into the commpage for dynamically
translated mtc0/mfc0 guest instructions, multiple offsetof()s are added
together to find the offset of the specific register in the mips_coproc,
within the commpage.

Simplify each of these cases to a single offsetof() to find the offset
of the specific register within the commpage.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gleb Natapov <gleb@kernel.org>
Cc: linux-mips@linux-mips.org
Cc: kvm@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/11888/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kvm/dyntrans.c