]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/infiniband/hw/ehca/ehca_reqs.c
IB/ehca: Refactor "maybe missed event" code
[linux-2.6-omap-h63xx.git] / drivers / infiniband / hw / ehca / ehca_reqs.c
index caec9dee09e1b0df65a0e03fed29d2e16324d4c3..56c4527c884f75b1c05727c7b40c07d2d61321cf 100644 (file)
@@ -637,7 +637,6 @@ poll_cq_exit0:
 int ehca_req_notify_cq(struct ib_cq *cq, enum ib_cq_notify_flags notify_flags)
 {
        struct ehca_cq *my_cq = container_of(cq, struct ehca_cq, ib_cq);
-       unsigned long spl_flags;
        int ret = 0;
 
        switch (notify_flags & IB_CQ_SOLICITED_MASK) {
@@ -652,6 +651,7 @@ int ehca_req_notify_cq(struct ib_cq *cq, enum ib_cq_notify_flags notify_flags)
        }
 
        if (notify_flags & IB_CQ_REPORT_MISSED_EVENTS) {
+               unsigned long spl_flags;
                spin_lock_irqsave(&my_cq->spinlock, spl_flags);
                ret = ipz_qeit_is_valid(&my_cq->ipz_queue);
                spin_unlock_irqrestore(&my_cq->spinlock, spl_flags);