[07/20] net/nfp: remove word sanity

Message ID 20230517161603.117728-8-stephen@networkplumber.org (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series Replace use of term sanity-check |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Stephen Hemminger May 17, 2023, 4:15 p.m. UTC
  There are two small uses of the non-inclusive term "sanity".
One in comment is easily removed, other is in a macro that
was defined but never used.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/nfp/nfp_flow.c                     |  2 +-
 drivers/net/nfp/nfpcore/nfp-common/nfp_resid.h | 13 -------------
 2 files changed, 1 insertion(+), 14 deletions(-)
  

Comments

Chaoyong He May 18, 2023, 1:37 a.m. UTC | #1
That looks good, thanks!

Actually, we also will delete it in an upcoming patch, so it's okay to remove it here.

Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>

> -----Original Message-----
> From: Stephen Hemminger <stephen@networkplumber.org>
> Sent: Thursday, May 18, 2023 12:16 AM
> To: dev@dpdk.org
> Cc: Stephen Hemminger <stephen@networkplumber.org>; Chaoyong He
> <chaoyong.he@corigine.com>; Niklas Soderlund
> <niklas.soderlund@corigine.com>
> Subject: [PATCH 07/20] net/nfp: remove word sanity
> 
> There are two small uses of the non-inclusive term "sanity".
> One in comment is easily removed, other is in a macro that was defined but
> never used.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>  drivers/net/nfp/nfp_flow.c                     |  2 +-
>  drivers/net/nfp/nfpcore/nfp-common/nfp_resid.h | 13 -------------
>  2 files changed, 1 insertion(+), 14 deletions(-)
> 
> diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c index
> 41b722f4d898..05507bc3a113 100644
> --- a/drivers/net/nfp/nfp_flow.c
> +++ b/drivers/net/nfp/nfp_flow.c
> @@ -1944,7 +1944,7 @@ nfp_flow_compile_item_proc(struct
> nfp_flower_representor *repr,
>  			break;
>  		}
> 
> -		/* Perform basic sanity checks */
> +		/* Perform basic checks */
>  		ret = nfp_flow_item_check(item, proc);
>  		if (ret != 0) {
>  			PMD_DRV_LOG(ERR, "nfp flow item %d check failed",
> item->type); diff --git a/drivers/net/nfp/nfpcore/nfp-common/nfp_resid.h
> b/drivers/net/nfp/nfpcore/nfp-common/nfp_resid.h
> index 394a7628e08a..b7e77d8fa051 100644
> --- a/drivers/net/nfp/nfpcore/nfp-common/nfp_resid.h
> +++ b/drivers/net/nfp/nfpcore/nfp-common/nfp_resid.h
> @@ -183,19 +183,6 @@ NFP_CPP_ID_ISLAND_of(uint32_t id)
>  		(int)(((_a) << 4) | ((_b) + 4)) : -1) \
>  	}))
> 
> -/*
> - *  Do a general sanity check on the ME ID.
> - * The check is on the highest possible island ID for the chip family and the
> - * microengine number must  be a master ID.
> - * @param meid      ME ID as created by NFP6000_MEID
> - */
> -#define NFP6000_MEID_IS_VALID(meid) \
> -	(__extension__ ({ \
> -		typeof(meid) _a = (meid); \
> -		((((_a) >> 4) < 64) && (((_a) >> 4) >= 0) && \
> -		 (((_a) & 0xF) >= 4)) \
> -	}))
> -
>  /*
>   *  Extract island ID from ME ID.
>   * @param meid   ME ID as created by NFP6000_MEID
> --
> 2.39.2
  

Patch

diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
index 41b722f4d898..05507bc3a113 100644
--- a/drivers/net/nfp/nfp_flow.c
+++ b/drivers/net/nfp/nfp_flow.c
@@ -1944,7 +1944,7 @@  nfp_flow_compile_item_proc(struct nfp_flower_representor *repr,
 			break;
 		}
 
-		/* Perform basic sanity checks */
+		/* Perform basic checks */
 		ret = nfp_flow_item_check(item, proc);
 		if (ret != 0) {
 			PMD_DRV_LOG(ERR, "nfp flow item %d check failed", item->type);
diff --git a/drivers/net/nfp/nfpcore/nfp-common/nfp_resid.h b/drivers/net/nfp/nfpcore/nfp-common/nfp_resid.h
index 394a7628e08a..b7e77d8fa051 100644
--- a/drivers/net/nfp/nfpcore/nfp-common/nfp_resid.h
+++ b/drivers/net/nfp/nfpcore/nfp-common/nfp_resid.h
@@ -183,19 +183,6 @@  NFP_CPP_ID_ISLAND_of(uint32_t id)
 		(int)(((_a) << 4) | ((_b) + 4)) : -1) \
 	}))
 
-/*
- *  Do a general sanity check on the ME ID.
- * The check is on the highest possible island ID for the chip family and the
- * microengine number must  be a master ID.
- * @param meid      ME ID as created by NFP6000_MEID
- */
-#define NFP6000_MEID_IS_VALID(meid) \
-	(__extension__ ({ \
-		typeof(meid) _a = (meid); \
-		((((_a) >> 4) < 64) && (((_a) >> 4) >= 0) && \
-		 (((_a) & 0xF) >= 4)) \
-	}))
-
 /*
  *  Extract island ID from ME ID.
  * @param meid   ME ID as created by NFP6000_MEID