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 5A15E43C60 for ; Thu, 7 Mar 2024 02:34:43 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 52BEF42ECF; Thu, 7 Mar 2024 02:34:43 +0100 (CET) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by mails.dpdk.org (Postfix) with ESMTP id 75D2442E64 for ; Thu, 7 Mar 2024 02:34:41 +0100 (CET) Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-412f67bc6d0so3371435e9.3 for ; Wed, 06 Mar 2024 17:34:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709775281; x=1710380081; darn=dpdk.org; 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=coUEvHjlhoCAASL1GNjoVAZWg53e+798h1sJRpSPXJQ=; b=dNiZZLG6idc4J+Wf2Yg9v07mmhglGOf4rJd919oIdjAA2LqXmhRiOTveBVXjsbiReq BruBfQ8SR8fDJ8rp3vyEOPHA2FzSY+HGpI9/KhxSFwsWMEUX1TqdzM5N70rl59nuudTp Fpct+wwOzGX/ltcbtW4vnb/rVwhQUGhengS3SUAez9qMXkb+PlH6M+JNoJ3WUSZBjQAm 8Qj7sQzwzIgy96FcwNV9oAAimoCkXPKjZwUEYYN+uLBj4ePVj3rLm/d8TbA/wud8F+IS 1dOIH9H++28WJNm/Mi98BUvoVo46UmTBvN6LViZsr0IPBHCqfDaOj3+mlU+qWjDZLs8w B8pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709775281; x=1710380081; 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=coUEvHjlhoCAASL1GNjoVAZWg53e+798h1sJRpSPXJQ=; b=Ff9RNaPkE100kXO7UwubC6dWARedSCGRtasEcr6BR83BsEtVZSx5k6JYn1bi75Sur7 oHfR4dpY5bpJxmqVHBqxLeXrJarDLfbBjUh9g48g0C2PaCDuTrkITzvKIEts6wSLLhIw dd5uuXTb/TN7K8wc/8zJRnMghE5t0QEB5ITevybfxYs0IUWv0wYAeD0s+5bwRynZdURr DlIIYECa4XKO0PMAcBeiC8gYvlNHT/6PULE9Q3BFYWoKSsiuS7IzNfwjomTsXHIQuHtI Aps6PIew96QYCIY6RQzoZoM0k2NCFcLYHWYJbTx4UGAVNfi94L1/Mzn+SRIkdHS+Pw1O 0sVg== X-Forwarded-Encrypted: i=1; AJvYcCXp1ffDxje1+3UbsgxDOxMK5WqXE5vygMVttg+oSliuSwoK8unR4/3EK3RO3zAKro52/ulCVaUYjH97w/JuOyI= X-Gm-Message-State: AOJu0YzCiNn5upu31yAICGO0aRHeLJ/us6VKydIwmDcvcN+tgyzaHJc7 qcMr0JC8ptwTy4W2ld1cND6KlQnnIHV9n+LVovmJH7/DOhrPFkWX X-Google-Smtp-Source: AGHT+IHuijeIgFetiFCloXPA7fa7iUaI21KyLzVpC4WByEt1aHu7+owwAswlv/XETir6egxZHWzJ5g== X-Received: by 2002:a05:600c:350c:b0:413:e19:337f with SMTP id h12-20020a05600c350c00b004130e19337fmr591525wmq.22.1709775280918; Wed, 06 Mar 2024 17:34:40 -0800 (PST) Received: from localhost ([2a01:4b00:d036:ae00:7aef:1aaa:3dff:d546]) by smtp.gmail.com with ESMTPSA id je13-20020a05600c1f8d00b00412fb4f5756sm867813wmb.27.2024.03.06.17.34.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 17:34:40 -0800 (PST) From: luca.boccassi@gmail.com To: Ferruh Yigit Cc: Chaoyong He , =?UTF-8?q?Morten=20Br=C3=B8rup?= , dpdk stable Subject: patch 'net/nfp: fix calloc parameters' has been queued to stable release 22.11.5 Date: Thu, 7 Mar 2024 01:30:58 +0000 Message-Id: <20240307013159.1735343-41-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240307013159.1735343-1-luca.boccassi@gmail.com> References: <20240307013159.1735343-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 22.11.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/09/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/0b4a4ace22483bdaacf33a3903a860357811d531 Thanks. Luca Boccassi --- >From 0b4a4ace22483bdaacf33a3903a860357811d531 Mon Sep 17 00:00:00 2001 From: Ferruh Yigit Date: Wed, 24 Jan 2024 18:53:59 +0000 Subject: [PATCH] net/nfp: fix calloc parameters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 0352f47a3bf923574afe17e822af58bedc7ead49 ] gcc [1] generates warning [2] about calloc usage, because calloc parameter order is wrong, fixing it by replacing parameters. [1] gcc (GCC) 14.0.0 20231102 (experimental) [2] Compiling C object .../net_nfp_nfpcore_nfp_mutex.c.o .../net/nfp/nfpcore/nfp_mutex.c: In function ‘nfp_cpp_mutex_alloc’: ../drivers/net/nfp/nfpcore/nfp_mutex.c:171:15: warning: allocation of insufficient size ‘1’ for type ‘struct nfp_cpp_mutex’ with size ‘48’ [-Walloc-size] 171 | mutex = calloc(sizeof(*mutex), 1); | ^ Fixes: c7e9729da6b5 ("net/nfp: support CPP") Signed-off-by: Ferruh Yigit Acked-by: Chaoyong He Acked-by: Morten Brørup --- drivers/net/nfp/nfpcore/nfp_mutex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/nfp/nfpcore/nfp_mutex.c b/drivers/net/nfp/nfpcore/nfp_mutex.c index 318c5800d7..b9de16e889 100644 --- a/drivers/net/nfp/nfpcore/nfp_mutex.c +++ b/drivers/net/nfp/nfpcore/nfp_mutex.c @@ -151,7 +151,7 @@ nfp_cpp_mutex_alloc(struct nfp_cpp *cpp, int target, if (tmp != key) return NFP_ERRPTR(EEXIST); - mutex = calloc(sizeof(*mutex), 1); + mutex = calloc(1, sizeof(*mutex)); if (!mutex) return NFP_ERRPTR(ENOMEM); -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-07 01:05:38.477547912 +0000 +++ 0041-net-nfp-fix-calloc-parameters.patch 2024-03-07 01:05:34.774939507 +0000 @@ -1 +1 @@ -From 0352f47a3bf923574afe17e822af58bedc7ead49 Mon Sep 17 00:00:00 2001 +From 0b4a4ace22483bdaacf33a3903a860357811d531 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit 0352f47a3bf923574afe17e822af58bedc7ead49 ] + @@ -25 +26,0 @@ -Cc: stable@dpdk.org @@ -35 +36 @@ -index 3c10c7a090..edb78dfdc9 100644 +index 318c5800d7..b9de16e889 100644 @@ -38 +39 @@ -@@ -168,7 +168,7 @@ nfp_cpp_mutex_alloc(struct nfp_cpp *cpp, +@@ -151,7 +151,7 @@ nfp_cpp_mutex_alloc(struct nfp_cpp *cpp, int target, @@ -40 +41 @@ - return NULL; + return NFP_ERRPTR(EEXIST); @@ -44,2 +45,2 @@ - if (mutex == NULL) - return NULL; + if (!mutex) + return NFP_ERRPTR(ENOMEM);