RE: [Patch v1 2/4] RDMA/mana_ib: create and process EQ events

From: Long Li
Date: Mon Nov 27 2023 - 14:00:32 EST


> > @@ -505,14 +507,24 @@ static void mana_gd_deregiser_irq(struct
> gdma_queue *queue)
> > if (WARN_ON(msix_index >= gc->num_msix_usable))
> > return;
> >
> > + spin_lock_irqsave(&r->lock, flags);
> > +
> > gic = &gc->irq_contexts[msix_index];
> > - gic->handler = NULL;
> > - gic->arg = NULL;
> > + list_for_each_rcu(p, &gic->eq_list) {
> > + eq = list_entry(p, struct gdma_queue, entry);
>
> Hi Long Li,
>
> Sparse complains a bit about this construction:
>
> .../gdma_main.c:513:9: error: incompatible types in comparison expression
> (different address spaces):
> .../gdma_main.c:513:9: struct list_head [noderef] __rcu *
> .../gdma_main.c:513:9: struct list_head *
> .../gdma_main.c:513:9: error: incompatible types in comparison expression
> (different address spaces):
> .../gdma_main.c:513:9: struct list_head [noderef] __rcu *
> .../gdma_main.c:513:9: struct list_head *
>
> Perhaps using list_for_each_entry_rcu() is appropriate here.

Thank you, I will fix this.

Long