[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN PATCH v2 3/4] x86/irq: rename variable to address MISRA C:2012 Rule 5.3
On 04.08.2023 10:03, Nicola Vetrini wrote: > The extern variable 'irq_desc' defined in 'irq.h' is shadowed by > local variables in the changed file. To avoid this, the variable is > renamed to 'irq_description'. > > No functional change. > > Signed-off-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx> > --- > xen/arch/x86/hvm/hvm.c | 2 +- > xen/arch/x86/include/asm/irq.h | 2 +- > xen/arch/x86/io_apic.c | 10 +++++----- > xen/arch/x86/irq.c | 12 ++++++------ > xen/arch/x86/msi.c | 4 ++-- > xen/include/xen/irq.h | 2 +- > 6 files changed, 16 insertions(+), 16 deletions(-) > > diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c > index 2180abeb33..ca5bb96388 100644 > --- a/xen/arch/x86/hvm/hvm.c > +++ b/xen/arch/x86/hvm/hvm.c > @@ -474,7 +474,7 @@ void hvm_migrate_pirq(struct hvm_pirq_dpci *pirq_dpci, > const struct vcpu *v) > > if ( !desc ) > return; > - ASSERT(MSI_IRQ(desc - irq_desc)); > + ASSERT(MSI_IRQ(desc - irq_descriptor)); > irq_set_affinity(desc, cpumask_of(v->processor)); > spin_unlock_irq(&desc->lock); > } > diff --git a/xen/arch/x86/include/asm/irq.h b/xen/arch/x86/include/asm/irq.h > index ad907fc97f..f6df977170 100644 > --- a/xen/arch/x86/include/asm/irq.h > +++ b/xen/arch/x86/include/asm/irq.h > @@ -172,7 +172,7 @@ int assign_irq_vector(int irq, const cpumask_t *mask); > > void cf_check irq_complete_move(struct irq_desc *desc); > > -extern struct irq_desc *irq_desc; > +extern struct irq_desc *irq_descriptor; In Arm code you'll find static irq_desc_t irq_desc[NR_IRQS]; It's static there right now, yes, but we don't want to introduce arch differences here. Therefore the global wants leaving alone, and "desc" wants using where function parameters collide. (Arm uses either "desc" or "irqd" everywhere afaics.) Jan
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |