Re: [PATCH 2/4] KVM: ARM: VGIC distributor cleanups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 3, 2012 at 9:45 AM, Marc Zyngier <marc.zyngier@xxxxxxx> wrote:
> On 01/12/12 16:49, Christoffer Dall wrote:
>> This commit fixes various dangling issues from Will Deacon's review, and
>> other stuff, such as use of braces, use of inline in a C file, leftover
>> debugging BUG_ON statements and some spelling nits.
>>
>> Cc: Peter Maydell <peter.maydell@xxxxxxx>
>> Cc: Marc Zyngier <marc.zyngier@xxxxxxx>
>> Cc: Will Deacon <will.deacon@xxxxxxx>
>> Signed-off-by: Christoffer Dall <c.dall@xxxxxxxxxxxxxxxxxxxxxx>
>> ---
>>  arch/arm/kvm/vgic.c |   76 +++++++++++++++++++++++++--------------------------
>>  1 file changed, 38 insertions(+), 38 deletions(-)
>>
>> diff --git a/arch/arm/kvm/vgic.c b/arch/arm/kvm/vgic.c
>> index 73b8c77..79a8c86 100644
>> --- a/arch/arm/kvm/vgic.c
>> +++ b/arch/arm/kvm/vgic.c
>> @@ -92,19 +92,18 @@ static void vgic_dispatch_sgi(struct kvm_vcpu *vcpu, u32 reg);
>>
>>  static u32 vgic_nr_lr;
>>
>> -static inline u32 *vgic_bitmap_get_reg(struct vgic_bitmap *x,
>> -                                    int cpuid, u32 offset)
>> +static u32 *vgic_bitmap_get_reg(struct vgic_bitmap *x,
>> +                             int cpuid, u32 offset)
>>  {
>>       offset >>= 2;
>> -     BUG_ON(offset > (VGIC_NR_IRQS / 32));
>>       if (!offset)
>>               return x->percpu[cpuid].reg;
>>       else
>>               return x->shared.reg + offset - 1;
>>  }
>>
>> -static inline int vgic_bitmap_get_irq_val(struct vgic_bitmap *x,
>> -                                      int cpuid, int irq)
>> +static int vgic_bitmap_get_irq_val(struct vgic_bitmap *x,
>> +                                int cpuid, int irq)
>>  {
>>       if (irq < VGIC_NR_PRIVATE_IRQS)
>>               return test_bit(irq, x->percpu[cpuid].reg_ul);
>> @@ -112,14 +111,14 @@ static inline int vgic_bitmap_get_irq_val(struct vgic_bitmap *x,
>>       return test_bit(irq - VGIC_NR_PRIVATE_IRQS, x->shared.reg_ul);
>>  }
>>
>> -static inline void vgic_bitmap_set_irq_val(struct vgic_bitmap *x,
>> -                                        int cpuid, int irq, int val)
>> +static void vgic_bitmap_set_irq_val(struct vgic_bitmap *x, int cpuid,
>> +                                 int irq, int val)
>>  {
>>       unsigned long *reg;
>>
>> -     if (irq < VGIC_NR_PRIVATE_IRQS)
>> +     if (irq < VGIC_NR_PRIVATE_IRQS) {
>>               reg = x->percpu[cpuid].reg_ul;
>> -     else {
>> +     } else {
>>               reg =  x->shared.reg_ul;
>>               irq -= VGIC_NR_PRIVATE_IRQS;
>>       }
>> @@ -130,21 +129,19 @@ static inline void vgic_bitmap_set_irq_val(struct vgic_bitmap *x,
>>               clear_bit(irq, reg);
>>  }
>>
>> -static inline unsigned long *vgic_bitmap_get_cpu_map(struct vgic_bitmap *x,
>> -                                                  int cpuid)
>> +static unsigned long *vgic_bitmap_get_cpu_map(struct vgic_bitmap *x, int cpuid)
>>  {
>>       if (unlikely(cpuid >= VGIC_MAX_CPUS))
>>               return NULL;
>>       return x->percpu[cpuid].reg_ul;
>>  }
>>
>> -static inline unsigned long *vgic_bitmap_get_shared_map(struct vgic_bitmap *x)
>> +static unsigned long *vgic_bitmap_get_shared_map(struct vgic_bitmap *x)
>>  {
>>       return x->shared.reg_ul;
>>  }
>>
>> -static inline u32 *vgic_bytemap_get_reg(struct vgic_bytemap *x,
>> -                                     int cpuid, u32 offset)
>> +static u32 *vgic_bytemap_get_reg(struct vgic_bytemap *x, int cpuid, u32 offset)
>>  {
>>       offset >>= 2;
>>       BUG_ON(offset > (VGIC_NR_IRQS / 4));
>> @@ -154,8 +151,8 @@ static inline u32 *vgic_bytemap_get_reg(struct vgic_bytemap *x,
>>               return x->shared + offset - 8;
>>  }
>>
>> -static inline int vgic_bytemap_get_irq_val(struct vgic_bytemap *x,
>> -                                        int cpuid, int irq)
>> +static int __attribute__ ((unused))
>> +vgic_bytemap_get_irq_val(struct vgic_bytemap *x, int cpuid, int irq)
>>  {
>>       u32 *reg, shift;
>>       shift = (irq & 3) * 8;
>> @@ -163,8 +160,9 @@ static inline int vgic_bytemap_get_irq_val(struct vgic_bytemap *x,
>>       return (*reg >> shift) & 0xff;
>>  }
>>
>> -static inline void vgic_bytemap_set_irq_val(struct vgic_bytemap *x,
>> -                                         int cpuid, int irq, int val)
>> +static void __attribute__ ((unused))
>> +vgic_bytemap_set_irq_val(struct vgic_bytemap *x, int cpuid,
>> +                      int irq, int val)
>
> Why why why (Del...)?
>
> If they are unused (and they are), let's get rid of them altogether.
>
I am totally fine with deleting them - I actually suggested that
earlier as well, but you kept them in the patches iirc, so I figured
you wanted to keep them around for the day when you want to introduce
priorities - or something....

Gone they will be :)

-Christoffer
_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/cucslists/listinfo/kvmarm


[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux