Skip to content

Commit

Permalink
KVM: Remove gratuitous casts from lapic.c
Browse files Browse the repository at this point in the history
Since vcpu->apic is of the correct type, there's not need to cast.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Avi Kivity <avi@qumranet.com>
  • Loading branch information
Rusty Russell authored and Avi Kivity committed Jan 30, 2008
1 parent 76fafa5 commit 7e620d1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/kvm/lapic.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ static inline int apic_find_highest_irr(struct kvm_lapic *apic)

int kvm_lapic_find_highest_irr(struct kvm_vcpu *vcpu)
{
struct kvm_lapic *apic = (struct kvm_lapic *)vcpu->apic;
struct kvm_lapic *apic = vcpu->apic;
int highest_irr;

if (!apic)
Expand Down Expand Up @@ -783,7 +783,7 @@ void kvm_free_lapic(struct kvm_vcpu *vcpu)

void kvm_lapic_set_tpr(struct kvm_vcpu *vcpu, unsigned long cr8)
{
struct kvm_lapic *apic = (struct kvm_lapic *)vcpu->apic;
struct kvm_lapic *apic = vcpu->apic;

if (!apic)
return;
Expand All @@ -792,7 +792,7 @@ void kvm_lapic_set_tpr(struct kvm_vcpu *vcpu, unsigned long cr8)

u64 kvm_lapic_get_cr8(struct kvm_vcpu *vcpu)
{
struct kvm_lapic *apic = (struct kvm_lapic *)vcpu->apic;
struct kvm_lapic *apic = vcpu->apic;
u64 tpr;

if (!apic)
Expand All @@ -805,7 +805,7 @@ EXPORT_SYMBOL_GPL(kvm_lapic_get_cr8);

void kvm_lapic_set_base(struct kvm_vcpu *vcpu, u64 value)
{
struct kvm_lapic *apic = (struct kvm_lapic *)vcpu->apic;
struct kvm_lapic *apic = vcpu->apic;

if (!apic) {
value |= MSR_IA32_APICBASE_BSP;
Expand Down Expand Up @@ -882,7 +882,7 @@ EXPORT_SYMBOL_GPL(kvm_lapic_reset);

int kvm_lapic_enabled(struct kvm_vcpu *vcpu)
{
struct kvm_lapic *apic = (struct kvm_lapic *)vcpu->apic;
struct kvm_lapic *apic = vcpu->apic;
int ret = 0;

if (!apic)
Expand Down

0 comments on commit 7e620d1

Please sign in to comment.