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 BA699A0C41; Wed, 15 Sep 2021 16:32:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 811874068F; Wed, 15 Sep 2021 16:32:39 +0200 (CEST) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by mails.dpdk.org (Postfix) with ESMTP id D13444014F for ; Wed, 15 Sep 2021 16:32:37 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id B82E4320091F; Wed, 15 Sep 2021 10:32:36 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 15 Sep 2021 10:32:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm2; bh=aleAh0KgXjUJAdUAp7/isKPpiw 2EI3s1NTwhee6Zaag=; b=LxMiULJqQycKLkQEbJ17MUZMaZSG14a5Rc5JLyVPLr k33C8mDXcraZU19ZfwXI03T5tp+08pYOTha8gHQB86uj95ZhFZfgR+UBo61Gy/PA mRYPG40eczYM8rkuZGVx47RzS/d6wEBn1aBsLbpb1GeVQJ5uDQgSxjzsfRCt+RnA 18RjR0W8U6XyAWXbHH6KBeoR2ZuvAEWSzgcnCyaXQNtLSUsLhlvH4CfybmCMz+E4 ak8MY6o3OFTamWkXY1wQcePYwTHj4ATKCvU98jFnef8fnVWvQZlp2ws9Dz07CH1p ohqVy3ZBiaBbofX5LuQ3fBx4LU/ReiJi84z0+X9tqfrQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=aleAh0KgXjUJAdUAp 7/isKPpiw2EI3s1NTwhee6Zaag=; b=HC6kHZK9QsTPFekUVneyBkxGd3mFBkFWn QX4VfGSLlqi26i8XVRRHgHzwXutpc3gV5MD3S6I2fA/urMqR8HnneHxP1mKVmtuT V3mtmmkIztJhwiSmq4JUlZVddu8VQOQ3HA2qTFnxJPUGn++ioRDlazKgSWZG6FED g7yoEALTIIRTUu9HmZntS4zUwUD2zzQW1XRujn9kBDxOQckucvh6KMuDbapxWzRJ 00Wbs3NqVx4VCbot1g8VcxRK/4jIG0tbLz41fzpbQ7psuYzeK2afC6MJoYNeEs3n 7JVhSdDQoX8daCnPd7NVbfT+iECP+IE05xKbMgL27SQ6ltZX3f9xA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudehuddgjeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgrshcu ofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecuggftrf grthhtvghrnhepvdelvdduhedvudduveeuvdevheegudelgeeigfejheduhedttdegudff jeeihffgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 15 Sep 2021 10:32:34 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: david.marchand@redhat.com, ferruh.yigit@intel.com, Anatoly Burakov Date: Wed, 15 Sep 2021 16:32:32 +0200 Message-Id: <20210915143232.2994872-1-thomas@monjalon.net> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] eal: remove plural syntax for single resource 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 Sender: "dev" Some comments and logs about cores, nodes and pages were using plural or hypotetic plural (s) form even if preceded by "0" or "no". It is replaced with singular form where appropriate. Signed-off-by: Thomas Monjalon --- lib/eal/common/eal_common_lcore.c | 13 +++++++++---- lib/eal/common/rte_malloc.c | 4 ++-- lib/eal/linux/eal_hugepage_info.c | 4 ++-- lib/eal/linux/eal_memory.c | 4 ++-- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/lib/eal/common/eal_common_lcore.c b/lib/eal/common/eal_common_lcore.c index 66d6bad1a7..6778ecc98f 100644 --- a/lib/eal/common/eal_common_lcore.c +++ b/lib/eal/common/eal_common_lcore.c @@ -191,9 +191,12 @@ rte_eal_cpu_init(void) /* Set the count of enabled logical cores of the EAL configuration */ config->lcore_count = count; RTE_LOG(DEBUG, EAL, - "Support maximum %u logical core(s) by configuration.\n", - RTE_MAX_LCORE); - RTE_LOG(INFO, EAL, "Detected %u lcore(s)\n", config->lcore_count); + "Support maximum %u logical core%s by configuration.\n", + RTE_MAX_LCORE, + RTE_MAX_LCORE > 1 ? "s" : ""); + RTE_LOG(INFO, EAL, "Detected %u lcore%s\n", + config->lcore_count, + config->lcore_count > 1 ? "s" : ""); /* sort all socket id's in ascending order */ qsort(lcore_to_socket_id, RTE_DIM(lcore_to_socket_id), @@ -208,7 +211,9 @@ rte_eal_cpu_init(void) socket_id; prev_socket_id = socket_id; } - RTE_LOG(INFO, EAL, "Detected %u NUMA nodes\n", config->numa_node_count); + RTE_LOG(INFO, EAL, "Detected %u NUMA node%s\n", + config->numa_node_count, + config->numa_node_count > 1 ? "s" : ""); return 0; } diff --git a/lib/eal/common/rte_malloc.c b/lib/eal/common/rte_malloc.c index 9d39e58c08..04cbb0078b 100644 --- a/lib/eal/common/rte_malloc.c +++ b/lib/eal/common/rte_malloc.c @@ -65,10 +65,10 @@ malloc_socket(const char *type, size_t size, unsigned int align, if (size == 0 || (align && !rte_is_power_of_2(align))) return NULL; - /* if there are no hugepages and if we are not allocating from an + /* if there are no hugepage and if we are not allocating from an * external heap, use memory from any socket available. checking for * socket being external may return -1 in case of invalid socket, but - * that's OK - if there are no hugepages, it doesn't matter. + * that's OK - if there are no hugepage, it doesn't matter. */ if (rte_malloc_heap_socket_is_external(socket_arg) != 1 && !rte_eal_has_hugepages()) diff --git a/lib/eal/linux/eal_hugepage_info.c b/lib/eal/linux/eal_hugepage_info.c index d97792cade..5673784186 100644 --- a/lib/eal/linux/eal_hugepage_info.c +++ b/lib/eal/linux/eal_hugepage_info.c @@ -117,7 +117,7 @@ get_num_hugepages(const char *subdir, size_t sz) over_pages = 0; if (num_pages == 0 && over_pages == 0) - RTE_LOG(WARNING, EAL, "No available %zu kB hugepages reported\n", + RTE_LOG(WARNING, EAL, "No available %zu kB hugepage reported\n", sz >> 10); num_pages += over_pages; @@ -158,7 +158,7 @@ get_num_hugepages_on_node(const char *subdir, unsigned int socket, size_t sz) return 0; if (num_pages == 0) - RTE_LOG(WARNING, EAL, "No free %zu kB hugepages reported on node %u\n", + RTE_LOG(WARNING, EAL, "No free %zu kB hugepage reported on node %u\n", sz >> 10, socket); /* diff --git a/lib/eal/linux/eal_memory.c b/lib/eal/linux/eal_memory.c index 03a4f2dd2d..d73d233a7d 100644 --- a/lib/eal/linux/eal_memory.c +++ b/lib/eal/linux/eal_memory.c @@ -1002,7 +1002,7 @@ remap_needed_hugepages(struct hugepage_file *hugepages, int n_pages) cur = &hugepages[cur_page]; prev = cur_page == 0 ? NULL : &hugepages[cur_page - 1]; - /* if size is zero, no more pages left */ + /* if size is zero, no more page left */ if (cur->size == 0) break; @@ -1550,7 +1550,7 @@ eal_legacy_hugepage_attach(void) struct rte_memseg_list *msl; struct rte_memseg *ms; - /* if size is zero, no more pages left */ + /* if size is zero, no more page left */ if (map_sz == 0) break; -- 2.33.0