From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id F244342B2C; Wed, 17 May 2023 18:16:52 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6A1AD42D55; Wed, 17 May 2023 18:16:19 +0200 (CEST) Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by mails.dpdk.org (Postfix) with ESMTP id 5B5D842D3B for ; Wed, 17 May 2023 18:16:15 +0200 (CEST) Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-643ac91c51fso748530b3a.1 for ; Wed, 17 May 2023 09:16:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684340174; x=1686932174; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3FSHiMioEPFWXPJKI6LlUMhfkclZSDjL9ZE86YDb+lA=; b=n1a8hqKvFOxZ6t72bTjpwf8o29g1AtM2zEWvfSLS14CrRuP6fK9WNb31J+Kl6C88pw GO5sP8usVsxrufbd5kQ2tuBpjYAKcE8wgMD0zxOi56ByT89Ys9I6NbNRbLH7RgvkxoaG 0WWLulQflLyTaZnUizPsunjwZAV8s6DMYozdvq16bYw09n9HYAbcqvBNSLahj287DEFX 6SC9/3hsWui/6odKQU1h8hTEqpGAtvirFDVBnjdJqD5h8mSbCM8eZ6dI+2Kd7JDTKRfj uQf3daQVhIeDRS0xWIPjQsE/hMqW6P+BQlX24YYku/n6zMSWv++FwqBVpDIwsjX5C8Pj lgIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684340174; x=1686932174; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3FSHiMioEPFWXPJKI6LlUMhfkclZSDjL9ZE86YDb+lA=; b=jlWxR+rpi0Ay3RVl62DgNqbXcmgkIJPQ7k6U9ifA3AVPpsvagBPpgnxJLq7Yd9DpY0 hRRAtp/evNquSswgLG7nqCdjI+8RJl9aRT6x+K5JLpFxNTckPdvjloYIcink9DPGLlM4 sxn1VoLue/KuFsiHBfPjFZo0laN8kVV3HQgIWRZeIa//xZOOlQ8UZV6hrn8c8tshb8m8 X4ycME68rJuhu3K8MWaIrAf6GNevKAywBCL2Zox/LsKSiLa7pnflcl8mY+PFSOhqlMi+ llP5CgiPRzf0zlirNgDiEgVd6zGGTxVbIXeABgbfYmCyFkCeCxyOR3rBHqWPUDBB+cpF 7YKw== X-Gm-Message-State: AC+VfDzRsdS3qZRkMLZjj2VVP+NcZuNdWBk3+8ydZGuDPajVLH7/sljC tVkI4i2UkrtyjMHxBstJJO0WAqgZVT7vpTkqu0udUQ== X-Google-Smtp-Source: ACHHUZ7WzC9Yo/+jppX1FHnoJ4Rld1yQe6czW/u1BP6K2GJe9o+w3kbjOprDu5GlVlKbtZ9oAcy9VA== X-Received: by 2002:a05:6a20:144d:b0:103:73a6:5cc1 with SMTP id a13-20020a056a20144d00b0010373a65cc1mr31765556pzi.4.1684340174299; Wed, 17 May 2023 09:16:14 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id h5-20020a62b405000000b0063f33e216dasm15793009pfn.96.2023.05.17.09.16.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 May 2023 09:16:13 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Jerin Jacob , Kiran Kumar K , Nithin Dabilpuram , Reshma Pattan Subject: [PATCH 06/20] lib: replace use of sanity check in comments and messages Date: Wed, 17 May 2023 09:15:49 -0700 Message-Id: <20230517161603.117728-7-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230517161603.117728-1-stephen@networkplumber.org> References: <20230517161603.117728-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sanity check is on the Tier 2 non-inclusive list. Replace or remove it. Signed-off-by: Stephen Hemminger --- 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(-) 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..5c075ae60230 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 consitency 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))) { -- 2.39.2