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 A1BDF43F09; Thu, 25 Apr 2024 20:27:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 74B8243943; Thu, 25 Apr 2024 20:27:51 +0200 (CEST) Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by mails.dpdk.org (Postfix) with ESMTP id 816A240A67 for ; Thu, 25 Apr 2024 20:27:49 +0200 (CEST) Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-6f103b541aeso1221117b3a.3 for ; Thu, 25 Apr 2024 11:27:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1714069668; x=1714674468; darn=dpdk.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=YEtM6uCyKrGGKrs05jxd64oPn6NV+9VOQdGfugmwih4=; b=cO3AnVgLbDr7Cg29za/KIGmOw4clg4otaJOB+BMwRN8g1gT9l3YFiJi1uFgGfV3noe xDAkg50R7sHnr42F74QYNL3ixIdI4A9qyvE2oSLUi3jRrBqsPz6jfn0tW6w5v635tuM9 BavYvYl2xYdY72C67YQc4AnUHRsXqMa3vIK+8wQbVBUMTC8FJrgsVGmwK6KlAgETfwMV 76G6YlCOfQEYLdOhMywgqSvOUTtYoF8GcmOYbe5wwTjOF1bax6peo+BpYUOLs3QhaBqS opkdW+s9JVSKcDp+BPIut2udUJTM3P6LB5kwTzEvRDDZI08jXtPWoxzAeBn/02qVw8l1 04aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714069668; x=1714674468; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YEtM6uCyKrGGKrs05jxd64oPn6NV+9VOQdGfugmwih4=; b=nGXxhjStgOOt+1dtXPiLMQlNtCuaekXi6IUdkUi7ShiAgKuMwfNW6bwOje+wLVtJCt ZmBJ3panvktem+VgVp1P+asOZF8b0BzqDcPEPFex83OymUsfzPodJSsDNQ+ClPc5RAWv HclmtBzQFpBDTYf+JgNxhStbJ9MwV8eZolvwXG7CE78xmOiSAR91X/27S0UQsuqqKNey JuIgXaWmhD3+NAf+Aig2AypiaOER8P5/qD7rIVjCxZ7UVwBTico/pfWK7ADLCpC8ZYeO LCpT7nPW8FBzIIXLDTFg+ryCpunvpwgi/M6QfZAHHRLb6/AAx/hEHuPf3q++5/poBS0D vrdA== X-Gm-Message-State: AOJu0YzTt/5HmXY7IZkfyar32HO6IWW6zlflJqDVVFO8HsIWiyXETJic tSNE4RqbcM08F2Wz0L2ae9Pc8ZMBwm/FWhkhnrcfm5jz0PeU/XwG0Gu/TkIXKbzgdwYy8/fF149 / X-Google-Smtp-Source: AGHT+IF+FbMzm8DWZhfeZr8OVV+XRSQEbLxU+aEs3mVrSfAJnv7uGwv8AZA+F8QSkBNX4EFZkWdWYQ== X-Received: by 2002:a05:6a00:21c9:b0:6ec:fdcc:3cce with SMTP id t9-20020a056a0021c900b006ecfdcc3ccemr756618pfj.5.1714069668450; Thu, 25 Apr 2024 11:27:48 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d7-20020a056a00244700b006f0ba1c8ddesm4067006pfj.184.2024.04.25.11.27.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 11:27:47 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [RFC 0/4] malloc type argument cleanup (part 1) Date: Thu, 25 Apr 2024 11:23:57 -0700 Message-ID: <20240425182738.4771-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 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 This part documents and provides script to replace the unused type argument in rte_malloc. The type was intended to be a string but never implemented, and if it hasn't been implemented in 10 years it won't be. Too invasive to completely remove it. Stephen Hemminger (4): rte_malloc: document that type is unused devtools/cocci: add script to find unnecessary malloc type devtools/cocci: add script to find where rte_calloc should be used eal/malloc: remove type argument from internal malloc routines devtools/cocci/malloc-type.cocci | 27 +++++++++++++++++++ devtools/cocci/prefer-calloc.cocci | 19 ++++++++++++++ lib/eal/common/eal_common_memzone.c | 6 ++--- lib/eal/common/malloc_heap.c | 39 ++++++++++++---------------- lib/eal/common/malloc_heap.h | 7 +++-- lib/eal/common/rte_malloc.c | 16 +++++------- lib/eal/include/eal_trace_internal.h | 4 +-- lib/eal/include/rte_malloc.h | 21 +++++---------- 8 files changed, 82 insertions(+), 57 deletions(-) create mode 100644 devtools/cocci/malloc-type.cocci create mode 100644 devtools/cocci/prefer-calloc.cocci -- 2.43.0