On 27-Feb-19 22:57, Saleem, Shiraz wrote: >> Subject: [PATCH rdma-next v2 07/11] RDMA/efa: Implement functions that >> submit and complete admin commands >> >> Add admin commands submissions/completions implementation. >> >> Signed-off-by: Gal Pressman <galpress@xxxxxxxxxx> >> --- >> drivers/infiniband/hw/efa/efa_com.c | 1184 >> +++++++++++++++++++++++++++++++++++ >> 1 file changed, 1184 insertions(+) >> create mode 100644 drivers/infiniband/hw/efa/efa_com.c >> > [...] > >> +static int efa_com_admin_init_sq(struct efa_com_dev *edev) { >> + struct efa_com_admin_queue *aq = &edev->aq; >> + struct efa_com_admin_sq *sq = &aq->sq; >> + u16 size = ADMIN_SQ_SIZE(aq->depth); >> + u32 addr_high; >> + u32 addr_low; >> + u32 aq_caps; >> + >> + sq->entries = >> + dma_alloc_coherent(aq->dmadev, size, &sq->dma_addr, >> GFP_KERNEL); >> + if (!sq->entries) >> + return -ENOMEM; >> + >> + spin_lock_init(&sq->lock); >> + >> + sq->cc = 0; >> + sq->pc = 0; >> + sq->phase = 1; >> + >> + sq->db_addr = (u32 __iomem *)(edev->reg_bar + >> +EFA_REGS_AQ_PROD_DB_OFF); >> + >> + addr_high = EFA_DMA_ADDR_TO_UINT32_HIGH(sq->dma_addr); >> + addr_low = EFA_DMA_ADDR_TO_UINT32_LOW(sq->dma_addr); >> + >> + writel(addr_low, edev->reg_bar + EFA_REGS_AQ_BASE_LO_OFF); >> + writel(addr_high, edev->reg_bar + EFA_REGS_AQ_BASE_HI_OFF); >> + >> + aq_caps = 0; > > Remove and change |= to = on next line. Few instances of these. Will do. > >> + aq_caps |= aq->depth & EFA_REGS_AQ_CAPS_AQ_DEPTH_MASK; >> + aq_caps |= (sizeof(struct efa_admin_aq_entry) << >> + EFA_REGS_AQ_CAPS_AQ_ENTRY_SIZE_SHIFT) & >> + EFA_REGS_AQ_CAPS_AQ_ENTRY_SIZE_MASK; >> + >> + writel(aq_caps, edev->reg_bar + EFA_REGS_AQ_CAPS_OFF); >> + >> + return 0; >> +} >> +