RDMA/siw: Suppress uninitialized var warning
authorAndrew Morton <akpm@linux-foundation.org>
Mon, 23 Mar 2020 18:46:27 +0000 (11:46 -0700)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 24 Mar 2020 01:22:37 +0000 (22:22 -0300)
drivers/infiniband/sw/siw/siw_qp_rx.c: In function siw_proc_send:
./include/linux/spinlock.h:288:3: warning: flags may be used uninitialized in this function [-Wmaybe-uninitialized]
   _raw_spin_unlock_irqrestore(lock, flags); \
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/infiniband/sw/siw/siw_qp_rx.c:335:16: note: flags was declared here
  unsigned long flags;

Link: https://lore.kernel.org/r/20200323184627.ZWPg91uin%akpm@linux-foundation.org
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/sw/siw/siw_qp_rx.c

index 9ccce29..6505202 100644 (file)
@@ -332,7 +332,7 @@ static struct siw_wqe *siw_rqe_get(struct siw_qp *qp)
        struct siw_srq *srq;
        struct siw_wqe *wqe = NULL;
        bool srq_event = false;
-       unsigned long flags;
+       unsigned long uninitialized_var(flags);
 
        srq = qp->srq;
        if (srq) {