Skip to content

Commit 19d837b

Browse files
Sebastian Ottoupton
authored andcommitted
KVM: arm64: vgic: fix unexpected unlock sparse warnings
Get rid of unexpected unlock sparse warnings in vgic code by adding an annotation to vgic_queue_irq_unlock(). arch/arm64/kvm/vgic/vgic.c:334:17: warning: context imbalance in 'vgic_queue_irq_unlock' - unexpected unlock arch/arm64/kvm/vgic/vgic.c:419:5: warning: context imbalance in 'kvm_vgic_inject_irq' - different lock contexts for basic block Signed-off-by: Sebastian Ott <[email protected]> Reviewed-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Oliver Upton <[email protected]>
1 parent 0aa34b3 commit 19d837b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

arch/arm64/kvm/vgic/vgic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ static bool vgic_validate_injection(struct vgic_irq *irq, bool level, void *owne
313313
* with all locks dropped.
314314
*/
315315
bool vgic_queue_irq_unlock(struct kvm *kvm, struct vgic_irq *irq,
316-
unsigned long flags)
316+
unsigned long flags) __releases(&irq->irq_lock)
317317
{
318318
struct kvm_vcpu *vcpu;
319319

arch/arm64/kvm/vgic/vgic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ bool vgic_get_phys_line_level(struct vgic_irq *irq);
186186
void vgic_irq_set_phys_pending(struct vgic_irq *irq, bool pending);
187187
void vgic_irq_set_phys_active(struct vgic_irq *irq, bool active);
188188
bool vgic_queue_irq_unlock(struct kvm *kvm, struct vgic_irq *irq,
189-
unsigned long flags);
189+
unsigned long flags) __releases(&irq->irq_lock);
190190
void vgic_kick_vcpus(struct kvm *kvm);
191191
void vgic_irq_handle_resampling(struct vgic_irq *irq,
192192
bool lr_deactivated, bool lr_pending);

0 commit comments

Comments
 (0)