net/qede/base: use pointer for bytes length read
authorRasesh Mody <rasesh.mody@cavium.com>
Sat, 8 Sep 2018 20:30:58 +0000 (13:30 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 27 Sep 2018 23:41:01 +0000 (01:41 +0200)
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
drivers/net/qede/base/ecore_mcp.c
drivers/net/qede/base/ecore_mcp_api.h

index ea71d07..364c146 100644 (file)
@@ -3053,7 +3053,7 @@ enum _ecore_status_t ecore_mcp_nvm_read(struct ecore_dev *p_dev, u32 addr,
 }
 
 enum _ecore_status_t ecore_mcp_phy_read(struct ecore_dev *p_dev, u32 cmd,
-                                       u32 addr, u8 *p_buf, u32 len)
+                                       u32 addr, u8 *p_buf, u32 *p_len)
 {
        struct ecore_hwfn *p_hwfn = ECORE_LEADING_HWFN(p_dev);
        struct ecore_ptt *p_ptt;
@@ -3068,7 +3068,7 @@ enum _ecore_status_t ecore_mcp_phy_read(struct ecore_dev *p_dev, u32 cmd,
                                  (cmd == ECORE_PHY_CORE_READ) ?
                                  DRV_MSG_CODE_PHY_CORE_READ :
                                  DRV_MSG_CODE_PHY_RAW_READ,
-                                 addr, &resp, &param, &len, (u32 *)p_buf);
+                                 addr, &resp, &param, p_len, (u32 *)p_buf);
        if (rc != ECORE_SUCCESS)
                DP_NOTICE(p_dev, false, "MCP command rc = %d\n", rc);
 
index 4098bae..7327074 100644 (file)
@@ -943,7 +943,7 @@ enum _ecore_status_t ecore_mcp_nvm_resp(struct ecore_dev *p_dev, u8 *p_buf);
  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
  */
 enum _ecore_status_t ecore_mcp_phy_read(struct ecore_dev *p_dev, u32 cmd,
-                                       u32 addr, u8 *p_buf, u32 len);
+                                       u32 addr, u8 *p_buf, u32 *p_len);
 
 /**
  * @brief Read from nvm