DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@amd.com>
To: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	Andy Moreton <andy.moreton@amd.com>,
	Ivan Malov <ivan.malov@arknetworks.am>
Cc: <dev@dpdk.org>, <stable@dpdk.org>
Subject: [PATCH v2 8/8] net/sfc: fix calloc parameters
Date: Wed, 24 Jan 2024 18:54:05 +0000	[thread overview]
Message-ID: <20240124185406.3598985-8-ferruh.yigit@amd.com> (raw)
In-Reply-To: <20240124185406.3598985-1-ferruh.yigit@amd.com>

gcc [1] generates warning [2] about rte_calloc usage, because
rte_calloc parameter order is wrong, fixing it by replacing parameters.

[1]
gcc (GCC) 14.0.1 20240124 (experimental)

[2]
Compiling C object drivers/libtmp_rte_net_sfc.a.p/net_sfc_sfc_mae.c.o
../net/sfc/sfc_mae.c: In function ‘sfc_mae_action_set_list_add’:
../drivers/net/sfc/sfc_mae.c:1353:35:
 warning: ‘rte_calloc’ sizes specified with ‘sizeof’ in the earlier
 argument and not in the later argument [-Wcalloc-transposed-args]
 1353 |                    sizeof(struct sfc_mae_action_set *),
      |                           ^~~~~~

Fixes: 002f591f54c3 ("net/sfc: support packet replay in transfer flows")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
Cc: ivan.malov@arknetworks.am
---
 drivers/net/sfc/sfc_mae.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c
index e5ec0ae49d4d..60ff6d21810a 100644
--- a/drivers/net/sfc/sfc_mae.c
+++ b/drivers/net/sfc/sfc_mae.c
@@ -1350,8 +1350,8 @@ sfc_mae_action_set_list_add(struct sfc_adapter *sa,
 
 	action_set_list->action_sets =
 		rte_calloc("sfc_mae_action_set_list_action_sets",
-			   sizeof(struct sfc_mae_action_set *),
-			   action_set_list->nb_action_sets, 0);
+			   action_set_list->nb_action_sets,
+			   sizeof(struct sfc_mae_action_set *), 0);
 	if (action_set_list->action_sets == NULL) {
 		sfc_err(sa, "failed to allocate action set list");
 		rte_free(action_set_list);
-- 
2.34.1


  parent reply	other threads:[~2024-01-24 18:55 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-02 13:08 [PATCH 1/2] pipeline: " Ferruh Yigit
2023-11-02 13:08 ` [PATCH 2/2] net/nfp: " Ferruh Yigit
2023-11-03  1:26   ` Chaoyong He
2023-11-06 14:26 ` [PATCH 1/2] pipeline: " Dumitrescu, Cristian
2024-01-24 18:53 ` [PATCH v2 1/8] " Ferruh Yigit
2024-01-24 18:53   ` [PATCH v2 2/8] net/nfp: " Ferruh Yigit
2024-01-24 19:01     ` Morten Brørup
2024-01-24 18:54   ` [PATCH v2 3/8] rawdev: " Ferruh Yigit
2024-01-24 18:59     ` Morten Brørup
2024-01-25  2:34     ` fengchengwen
2024-01-25  3:39     ` Hemant Agrawal
2024-01-24 18:54   ` [PATCH v2 4/8] eventdev: " Ferruh Yigit
2024-01-24 18:59     ` Morten Brørup
2024-01-25  2:34     ` fengchengwen
2024-01-24 18:54   ` [PATCH v2 5/8] dmadev: " Ferruh Yigit
2024-01-24 18:59     ` Morten Brørup
2024-01-25  2:35     ` fengchengwen
2024-01-24 18:54   ` [PATCH v2 6/8] common/mlx5: " Ferruh Yigit
2024-01-24 19:01     ` Morten Brørup
2024-01-26 10:12       ` Dariusz Sosnowski
2024-01-24 18:54   ` [PATCH v2 7/8] net/bnx2x: " Ferruh Yigit
2024-01-24 19:01     ` Morten Brørup
2024-01-24 18:54   ` Ferruh Yigit [this message]
2024-01-24 19:02     ` [PATCH v2 8/8] net/sfc: " Morten Brørup
2024-01-25  7:10       ` Andrew Rybchenko
2024-01-24 19:00   ` [PATCH v2 1/8] pipeline: " Morten Brørup
2024-02-18 16:08   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240124185406.3598985-8-ferruh.yigit@amd.com \
    --to=ferruh.yigit@amd.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=andy.moreton@amd.com \
    --cc=dev@dpdk.org \
    --cc=ivan.malov@arknetworks.am \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).