]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[bnxt] Remove unnecessary test_if macro
authorMichael Brown <mcb30@ipxe.org>
Wed, 30 Jul 2025 13:08:25 +0000 (14:08 +0100)
committerMichael Brown <mcb30@ipxe.org>
Wed, 30 Jul 2025 13:08:25 +0000 (14:08 +0100)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/net/bnxt/bnxt.c
src/drivers/net/bnxt/bnxt.h
src/drivers/net/bnxt/bnxt_dbg.h

index f6cc7bb3df02751d19acd11f4c1e991d00b52e99..0a7091b5f44a3b15d493dcd8d1ee5f3945eaddac 100644 (file)
@@ -624,7 +624,7 @@ int bnxt_alloc_mem ( struct bnxt *bp )
                                     CQ_RING_BUFFER_SIZE, BNXT_DMA_ALIGNMENT );
        bp->nq.bd_virt = dma_alloc ( bp->dma, &bp->nq_mapping,
                                     NQ_RING_BUFFER_SIZE, BNXT_DMA_ALIGNMENT );
-       test_if ( bp->hwrm_addr_req &&
+       if ( bp->hwrm_addr_req &&
                bp->hwrm_addr_resp &&
                bp->hwrm_addr_dma &&
                bp->tx.bd_virt &&
@@ -693,7 +693,7 @@ static int wait_resp ( struct bnxt *bp, u32 tmo, u16 len, const char *func )
 
        for ( idx = 0; idx < wait_cnt; idx++ ) {
                resp_len = resp->resp_len;
-               test_if ( resp->seq_id == req->seq_id &&
+               if ( resp->seq_id == req->seq_id &&
                        resp->req_type == req->req_type &&
                        ptr[resp_len - 1] == 1 ) {
                        bp->last_resp_code = resp->error_code;
@@ -739,7 +739,7 @@ static int bnxt_hwrm_ver_get ( struct bnxt *bp )
                resp->chip_bond_id << 8 |
                resp->chip_platform_type;
        bp->chip_num = resp->chip_num;
-       test_if ( ( resp->dev_caps_cfg & SHORT_CMD_SUPPORTED ) &&
+       if ( ( resp->dev_caps_cfg & SHORT_CMD_SUPPORTED ) &&
                 ( resp->dev_caps_cfg & SHORT_CMD_REQUIRED ) )
                FLAG_SET ( bp->flags, BNXT_FLAG_HWRM_SHORT_CMD_SUPP );
        bp->hwrm_max_ext_req_len = resp->max_ext_req_len;
@@ -1257,24 +1257,24 @@ static int bnxt_get_link_speed ( struct bnxt *bp )
 
        DBGP ( "%s\n", __func__ );
        if ( ! ( FLAG_TEST (bp->flags, BNXT_FLAG_IS_CHIP_P7 ) ) ) {
-               test_if ( bnxt_hwrm_nvm_get_variable_req ( bp, 4,
+               if ( bnxt_hwrm_nvm_get_variable_req ( bp, 4,
                        ( u16 )LINK_SPEED_DRV_NUM,
                        1, ( u16 )bp->port_idx ) != STATUS_SUCCESS )
                        return STATUS_FAILURE;
                bp->link_set = SET_LINK ( *ptr32, SPEED_DRV_MASK, SPEED_DRV_SHIFT );
-               test_if ( bnxt_hwrm_nvm_get_variable_req ( bp, 4,
+               if ( bnxt_hwrm_nvm_get_variable_req ( bp, 4,
                        ( u16 )D3_LINK_SPEED_FW_NUM, 1,
                        ( u16 )bp->port_idx ) != STATUS_SUCCESS )
                        return STATUS_FAILURE;
                bp->link_set |= SET_LINK ( *ptr32, D3_SPEED_FW_MASK,
                                D3_SPEED_FW_SHIFT );
        }
-       test_if ( bnxt_hwrm_nvm_get_variable_req ( bp, 4,
+       if ( bnxt_hwrm_nvm_get_variable_req ( bp, 4,
                ( u16 )LINK_SPEED_FW_NUM,
                1, ( u16 )bp->port_idx ) != STATUS_SUCCESS )
                return STATUS_FAILURE;
        bp->link_set |= SET_LINK ( *ptr32, SPEED_FW_MASK, SPEED_FW_SHIFT );
-       test_if ( bnxt_hwrm_nvm_get_variable_req ( bp, 1,
+       if ( bnxt_hwrm_nvm_get_variable_req ( bp, 1,
                 ( u16 )PORT_CFG_LINK_SETTINGS_MEDIA_AUTO_DETECT_NUM,
                1, ( u16 )bp->port_idx ) != STATUS_SUCCESS )
                return STATUS_FAILURE;
index 779e90d193f1e96f2929d46348afffb113b2d7b5..5eed766eb6215977b96a41769db61f77d9ebce01 100644 (file)
@@ -1019,7 +1019,6 @@ struct bnxt {
 };
 
 /* defines required to rsolve checkpatch errors / warnings */
-#define test_if               if
 #define SHORT_CMD_SUPPORTED   VER_GET_RESP_DEV_CAPS_CFG_SHORT_CMD_SUPPORTED
 #define SHORT_CMD_REQUIRED    VER_GET_RESP_DEV_CAPS_CFG_SHORT_CMD_REQUIRED
 #define CQ_DOORBELL_KEY_MASK(a) (\
index efa8f1215a2f6a011078278d80178dc3dbb0d82a..d6e66ceef8d781c2ccf1d3c2fa387f6f5b7852b4 100644 (file)
@@ -197,7 +197,7 @@ void dbg_fw_ver(struct hwrm_ver_get_output *resp, u32 tmo)
                (u32)(resp->chip_metal << 16) |
                (u32)(resp->chip_bond_id << 8) |
                (u32)resp->chip_platform_type);
-       test_if((resp->dev_caps_cfg & SHORT_CMD_SUPPORTED) &&
+       if((resp->dev_caps_cfg & SHORT_CMD_SUPPORTED) &&
                (resp->dev_caps_cfg & SHORT_CMD_REQUIRED))
                dbg_prn("  SHORT_CMD_SUPPORTED\n");
 }