remove extra parentheses in return statement
[dpdk.git] / drivers / net / bnx2x / bnx2x.c
index 67af5da..5a38c32 100644 (file)
@@ -292,13 +292,13 @@ void bnx2x_post_dmae(struct bnx2x_softc *sc, struct dmae_command *dmae, int idx)
 
 uint32_t bnx2x_dmae_opcode_add_comp(uint32_t opcode, uint8_t comp_type)
 {
-       return (opcode | ((comp_type << DMAE_COMMAND_C_DST_SHIFT) |
-                         DMAE_COMMAND_C_TYPE_ENABLE));
+       return opcode | ((comp_type << DMAE_COMMAND_C_DST_SHIFT) |
+                         DMAE_COMMAND_C_TYPE_ENABLE);
 }
 
 uint32_t bnx2x_dmae_opcode_clr_src_reset(uint32_t opcode)
 {
-       return (opcode & ~DMAE_COMMAND_SRC_RESET);
+       return opcode & ~DMAE_COMMAND_SRC_RESET;
 }
 
 uint32_t
@@ -1098,7 +1098,7 @@ static int bnx2x_tx_queue_has_work(const struct bnx2x_fastpath *fp)
 
        mb();                   /* status block fields can change */
        hw_cons = le16toh(*fp->tx_cons_sb);
-       return (hw_cons != txq->tx_pkt_head);
+       return hw_cons != txq->tx_pkt_head;
 }
 
 static uint8_t bnx2x_has_tx_work(struct bnx2x_fastpath *fp)
@@ -1122,7 +1122,7 @@ static int bnx2x_has_rx_work(struct bnx2x_fastpath *fp)
        if (unlikely((rx_cq_cons_sb & MAX_RCQ_ENTRIES(rxq)) ==
                     MAX_RCQ_ENTRIES(rxq)))
                rx_cq_cons_sb++;
-       return (rxq->rx_cq_head != rx_cq_cons_sb);
+       return rxq->rx_cq_head != rx_cq_cons_sb;
 }
 
 static void
@@ -1280,7 +1280,7 @@ next_cqe:
        /* Update producers */
        bnx2x_update_rx_prod(sc, fp, bd_prod_fw, sw_cq_prod);
 
-       return (sw_cq_cons != hw_cq_cons);
+       return sw_cq_cons != hw_cq_cons;
 }
 
 static uint16_t
@@ -2559,7 +2559,7 @@ static void bnx2x_clear_reset_global(struct bnx2x_softc *sc)
 /* checks the GLOBAL_RESET bit, should be run under rtnl lock */
 static uint8_t bnx2x_reset_is_global(struct bnx2x_softc *sc)
 {
-       return (REG_RD(sc, BNX2X_RECOVERY_GLOB_REG) & BNX2X_GLOBAL_RESET_BIT);
+       return REG_RD(sc, BNX2X_RECOVERY_GLOB_REG) & BNX2X_GLOBAL_RESET_BIT;
 }
 
 /* clear RESET_IN_PROGRESS bit for the engine, should be run under rtnl lock */
@@ -2618,7 +2618,7 @@ static uint8_t bnx2x_get_load_status(struct bnx2x_softc *sc, int engine)
 
        val = ((val & mask) >> shift);
 
-       return (val != 0);
+       return val != 0;
 }
 
 /* set pf load mark */
@@ -4860,9 +4860,9 @@ bnx2x_init_sb(struct bnx2x_softc *sc, phys_addr_t busaddr, int vfid,
 static uint8_t bnx2x_fp_qzone_id(struct bnx2x_fastpath *fp)
 {
        if (CHIP_IS_E1x(fp->sc)) {
-               return (fp->cl_id + SC_PORT(fp->sc) * ETH_MAX_RX_CLIENTS_E1H);
+               return fp->cl_id + SC_PORT(fp->sc) * ETH_MAX_RX_CLIENTS_E1H;
        } else {
-               return (fp->cl_id);
+               return fp->cl_id;
        }
 }
 
@@ -4872,9 +4872,9 @@ bnx2x_rx_ustorm_prods_offset(struct bnx2x_softc *sc, struct bnx2x_fastpath *fp)
        uint32_t offset = BAR_USTRORM_INTMEM;
 
        if (IS_VF(sc)) {
-               return (PXP_VF_ADDR_USDM_QUEUES_START +
+               return PXP_VF_ADDR_USDM_QUEUES_START +
                        (sc->acquire_resp.resc.hw_qid[fp->index] *
-                        sizeof(struct ustorm_queue_zone_data)));
+                        sizeof(struct ustorm_queue_zone_data));
        } else if (!CHIP_IS_E1x(sc)) {
                offset += USTORM_RX_PRODS_E2_OFFSET(fp->cl_qzone_id);
        } else {
@@ -7587,8 +7587,8 @@ static uint32_t bnx2x_pcie_capability_read(struct bnx2x_softc *sc, int reg)
 
 static uint8_t bnx2x_is_pcie_pending(struct bnx2x_softc *sc)
 {
-       return (bnx2x_pcie_capability_read(sc, PCIR_EXPRESS_DEVICE_STA) &
-               PCIM_EXP_STA_TRANSACTION_PND);
+       return bnx2x_pcie_capability_read(sc, PCIR_EXPRESS_DEVICE_STA) &
+               PCIM_EXP_STA_TRANSACTION_PND;
 }
 
 /*
@@ -9922,7 +9922,7 @@ static uint32_t bnx2x_get_pretend_reg(struct bnx2x_softc *sc)
 {
        uint32_t base = PXP2_REG_PGL_PRETEND_FUNC_F0;
        uint32_t stride = (PXP2_REG_PGL_PRETEND_FUNC_F1 - base);
-       return (base + (SC_ABS_FUNC(sc)) * stride);
+       return base + (SC_ABS_FUNC(sc)) * stride;
 }
 
 /*
@@ -10777,11 +10777,11 @@ static uint32_t bnx2x_flr_clnup_poll_count(struct bnx2x_softc *sc)
 {
        /* adjust polling timeout */
        if (CHIP_REV_IS_EMUL(sc)) {
-               return (FLR_POLL_CNT * 2000);
+               return FLR_POLL_CNT * 2000;
        }
 
        if (CHIP_REV_IS_FPGA(sc)) {
-               return (FLR_POLL_CNT * 120);
+               return FLR_POLL_CNT * 120;
        }
 
        return FLR_POLL_CNT;