[v4,25/30] net/ice/base: remove unnecessary error log

Message ID 20190923062702.3836-26-qi.z.zhang@intel.com (mailing list archive)
State Superseded, archived
Delegated to: xiaolong ye
Headers
Series net/ice/base: share code update secend batch. |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Qi Zhang Sept. 23, 2019, 6:26 a.m. UTC
  Remove the error log message when attempting to download a p
ackage that has an unsupported version.

Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_flex_pipe.c | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)
  

Comments

Qiming Yang Sept. 23, 2019, 7:11 a.m. UTC | #1
> -----Original Message-----
> From: Zhang, Qi Z
> Sent: Monday, September 23, 2019 2:27 PM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Yang, Qiming
> <qiming.yang@intel.com>
> Cc: dev@dpdk.org; Ye, Xiaolong <xiaolong.ye@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Nowlin, Dan <dan.nowlin@intel.com>; Stillwell Jr,
> Paul M <paul.m.stillwell.jr@intel.com>
> Subject: [PATCH v4 25/30] net/ice/base: remove unnecessary error log
> 
> Remove the error log message when attempting to download a p ackage that

'p ackage' is weird.

> has an unsupported version.
> 
> Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
> Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> ---
>  drivers/net/ice/base/ice_flex_pipe.c | 16 ++++------------
>  1 file changed, 4 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/net/ice/base/ice_flex_pipe.c
> b/drivers/net/ice/base/ice_flex_pipe.c
> index 318168910..11601f2c2 100644
> --- a/drivers/net/ice/base/ice_flex_pipe.c
> +++ b/drivers/net/ice/base/ice_flex_pipe.c
> @@ -1284,7 +1284,6 @@ static void ice_init_pkg_regs(struct ice_hw *hw)
> 
>  /**
>   * ice_chk_pkg_version - check package version for compatibility with driver
> - * @hw: pointer to the hardware structure
>   * @pkg_ver: pointer to a version structure to check
>   *
>   * Check to make sure that the package about to be downloaded is
> compatible with @@ -1292,18 +1291,11 @@ static void
> ice_init_pkg_regs(struct ice_hw *hw)
>   * version must match our ICE_PKG_SUPP_VER_MAJ and
> ICE_PKG_SUPP_VER_MNR
>   * definitions.
>   */
> -static enum ice_status
> -ice_chk_pkg_version(struct ice_hw *hw, struct ice_pkg_ver *pkg_ver)
> +static enum ice_status ice_chk_pkg_version(struct ice_pkg_ver *pkg_ver)
>  {
>  	if (pkg_ver->major != ICE_PKG_SUPP_VER_MAJ ||
> -	    pkg_ver->minor != ICE_PKG_SUPP_VER_MNR) {
> -		ice_info(hw, "ERROR: Incompatible package: %d.%d.%d.%d -
> requires package version: %d.%d.*.*\n",
> -			 pkg_ver->major, pkg_ver->minor, pkg_ver->update,
> -			 pkg_ver->draft, ICE_PKG_SUPP_VER_MAJ,
> -			 ICE_PKG_SUPP_VER_MNR);
> -
> +	    pkg_ver->minor != ICE_PKG_SUPP_VER_MNR)
>  		return ICE_ERR_NOT_SUPPORTED;
> -	}
> 
>  	return ICE_SUCCESS;
>  }
> @@ -1358,7 +1350,7 @@ enum ice_status ice_init_pkg(struct ice_hw *hw,
> u8 *buf, u32 len)
>  	/* before downloading the package, check package version for
>  	 * compatibility with driver
>  	 */
> -	status = ice_chk_pkg_version(hw, &hw->pkg_ver);
> +	status = ice_chk_pkg_version(&hw->pkg_ver);
>  	if (status)
>  		return status;
> 
> @@ -1384,7 +1376,7 @@ enum ice_status ice_init_pkg(struct ice_hw *hw,
> u8 *buf, u32 len)
>  	if (!status) {
>  		status = ice_get_pkg_info(hw);
>  		if (!status)
> -			status = ice_chk_pkg_version(hw, &hw-
> >active_pkg_ver);
> +			status = ice_chk_pkg_version(&hw->active_pkg_ver);
>  	}
> 
>  	if (!status) {
> --
> 2.13.6
  

Patch

diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c
index 318168910..11601f2c2 100644
--- a/drivers/net/ice/base/ice_flex_pipe.c
+++ b/drivers/net/ice/base/ice_flex_pipe.c
@@ -1284,7 +1284,6 @@  static void ice_init_pkg_regs(struct ice_hw *hw)
 
 /**
  * ice_chk_pkg_version - check package version for compatibility with driver
- * @hw: pointer to the hardware structure
  * @pkg_ver: pointer to a version structure to check
  *
  * Check to make sure that the package about to be downloaded is compatible with
@@ -1292,18 +1291,11 @@  static void ice_init_pkg_regs(struct ice_hw *hw)
  * version must match our ICE_PKG_SUPP_VER_MAJ and ICE_PKG_SUPP_VER_MNR
  * definitions.
  */
-static enum ice_status
-ice_chk_pkg_version(struct ice_hw *hw, struct ice_pkg_ver *pkg_ver)
+static enum ice_status ice_chk_pkg_version(struct ice_pkg_ver *pkg_ver)
 {
 	if (pkg_ver->major != ICE_PKG_SUPP_VER_MAJ ||
-	    pkg_ver->minor != ICE_PKG_SUPP_VER_MNR) {
-		ice_info(hw, "ERROR: Incompatible package: %d.%d.%d.%d - requires package version: %d.%d.*.*\n",
-			 pkg_ver->major, pkg_ver->minor, pkg_ver->update,
-			 pkg_ver->draft, ICE_PKG_SUPP_VER_MAJ,
-			 ICE_PKG_SUPP_VER_MNR);
-
+	    pkg_ver->minor != ICE_PKG_SUPP_VER_MNR)
 		return ICE_ERR_NOT_SUPPORTED;
-	}
 
 	return ICE_SUCCESS;
 }
@@ -1358,7 +1350,7 @@  enum ice_status ice_init_pkg(struct ice_hw *hw, u8 *buf, u32 len)
 	/* before downloading the package, check package version for
 	 * compatibility with driver
 	 */
-	status = ice_chk_pkg_version(hw, &hw->pkg_ver);
+	status = ice_chk_pkg_version(&hw->pkg_ver);
 	if (status)
 		return status;
 
@@ -1384,7 +1376,7 @@  enum ice_status ice_init_pkg(struct ice_hw *hw, u8 *buf, u32 len)
 	if (!status) {
 		status = ice_get_pkg_info(hw);
 		if (!status)
-			status = ice_chk_pkg_version(hw, &hw->active_pkg_ver);
+			status = ice_chk_pkg_version(&hw->active_pkg_ver);
 	}
 
 	if (!status) {