[v3,05/19] lib: replace use of sanity check in comments and messages

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

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Stephen Hemminger May 19, 2023, 5:45 p.m. UTC
  Sanity check is on the Tier 2 non-inclusive list.
Replace or remove it.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/graph/graph.c           | 2 +-
 lib/graph/graph_stats.c     | 2 +-
 lib/graph/node.c            | 2 +-
 lib/jobstats/rte_jobstats.c | 6 +++---
 lib/metrics/rte_metrics.c   | 2 +-
 lib/pcapng/rte_pcapng.c     | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)
  

Patch

diff --git a/lib/graph/graph.c b/lib/graph/graph.c
index 5582631b5301..597e9e7aa28e 100644
--- a/lib/graph/graph.c
+++ b/lib/graph/graph.c
@@ -283,7 +283,7 @@  rte_graph_create(const char *name, struct rte_graph_param *prm)
 
 	graph_spinlock_lock();
 
-	/* Check arguments sanity */
+	/* Check argument validity */
 	if (prm == NULL)
 		SET_ERR_JMP(EINVAL, fail, "Param should not be NULL");
 
diff --git a/lib/graph/graph_stats.c b/lib/graph/graph_stats.c
index c0140ba92212..28d5728e5e61 100644
--- a/lib/graph/graph_stats.c
+++ b/lib/graph/graph_stats.c
@@ -271,7 +271,7 @@  rte_graph_cluster_stats_create(const struct rte_graph_cluster_stats_param *prm)
 	const char *pattern;
 	rte_graph_t i;
 
-	/* Sanity checks */
+	/* Validate arguments */
 	if (!rte_graph_has_stats_feature())
 		SET_ERR_JMP(EINVAL, fail, "Stats feature is not enabled");
 
diff --git a/lib/graph/node.c b/lib/graph/node.c
index 149414dcd94c..3f0ae0c395db 100644
--- a/lib/graph/node.c
+++ b/lib/graph/node.c
@@ -68,7 +68,7 @@  __rte_node_register(const struct rte_node_register *reg)
 
 	graph_spinlock_lock();
 
-	/* Check sanity */
+	/* Check argument validity */
 	if (reg == NULL || reg->process == NULL) {
 		rte_errno = EINVAL;
 		goto fail;
diff --git a/lib/jobstats/rte_jobstats.c b/lib/jobstats/rte_jobstats.c
index af565a14eaf3..1c4b280c952a 100644
--- a/lib/jobstats/rte_jobstats.c
+++ b/lib/jobstats/rte_jobstats.c
@@ -124,7 +124,7 @@  rte_jobstats_start(struct rte_jobstats_context *ctx, struct rte_jobstats *job)
 {
 	uint64_t now;
 
-	/* Some sanity check. */
+	/* Check validity of arguments. */
 	if (unlikely(ctx == NULL || job == NULL || job->context != NULL))
 		return -EINVAL;
 
@@ -144,7 +144,7 @@  rte_jobstats_abort(struct rte_jobstats *job)
 	struct rte_jobstats_context *ctx;
 	uint64_t now, exec_time;
 
-	/* Some sanity check. */
+	/* Check that arguments are valid */
 	if (unlikely(job == NULL || job->context == NULL))
 		return -EINVAL;
 
@@ -165,7 +165,7 @@  rte_jobstats_finish(struct rte_jobstats *job, int64_t job_value)
 	uint64_t now, exec_time;
 	int need_update;
 
-	/* Some sanity check. */
+	/* Check arguments */
 	if (unlikely(job == NULL || job->context == NULL))
 		return -EINVAL;
 
diff --git a/lib/metrics/rte_metrics.c b/lib/metrics/rte_metrics.c
index 0ccdbabc04eb..f60d4f3f6e25 100644
--- a/lib/metrics/rte_metrics.c
+++ b/lib/metrics/rte_metrics.c
@@ -120,7 +120,7 @@  rte_metrics_reg_names(const char * const *names, uint16_t cnt_names)
 	uint16_t idx_name;
 	uint16_t idx_base;
 
-	/* Some sanity checks */
+	/* Some consistency checks */
 	if (cnt_names < 1 || names == NULL)
 		return -EINVAL;
 	for (idx_name = 0; idx_name < cnt_names; idx_name++)
diff --git a/lib/pcapng/rte_pcapng.c b/lib/pcapng/rte_pcapng.c
index 3c91fc77644a..fedf4b5b7f11 100644
--- a/lib/pcapng/rte_pcapng.c
+++ b/lib/pcapng/rte_pcapng.c
@@ -669,7 +669,7 @@  rte_pcapng_write_packets(rte_pcapng_t *self,
 		struct rte_mbuf *m = pkts[i];
 		struct pcapng_enhance_packet_block *epb;
 
-		/* sanity check that is really a pcapng mbuf */
+		/* Check that is really a pcapng mbuf */
 		epb = rte_pktmbuf_mtod(m, struct pcapng_enhance_packet_block *);
 		if (unlikely(epb->block_type != PCAPNG_ENHANCED_PACKET_BLOCK ||
 			     epb->block_length != rte_pktmbuf_data_len(m))) {