From patchwork Wed May 31 09:37:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Jarry X-Patchwork-Id: 1788204 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=OVZORk9+; dkim-atps=neutral Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QWPMZ18LXz20QB for ; Wed, 31 May 2023 19:38:17 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 7FDB982199; Wed, 31 May 2023 09:38:15 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 7FDB982199 Authentication-Results: smtp1.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=OVZORk9+ X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rWTi6GBgEspD; Wed, 31 May 2023 09:38:14 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp1.osuosl.org (Postfix) with ESMTPS id 81BD682114; Wed, 31 May 2023 09:38:13 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 81BD682114 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 61534C007C; Wed, 31 May 2023 09:38:13 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists.linuxfoundation.org (Postfix) with ESMTP id ACE9AC0037 for ; Wed, 31 May 2023 09:38:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 72B66410EA for ; Wed, 31 May 2023 09:38:11 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 72B66410EA Authentication-Results: smtp4.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=OVZORk9+ X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YbmyRx43563n for ; Wed, 31 May 2023 09:38:10 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 90FDE410E8 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp4.osuosl.org (Postfix) with ESMTPS id 90FDE410E8 for ; Wed, 31 May 2023 09:38:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685525889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TL6Zf4KVPSLUV0jcjpU9yCjbezkIFHeARI1grLen9T0=; b=OVZORk9+3vSzTVlynFr1UvZhBpEtmgy7wCmPpViGWjtG4FoLx1E3N8ZGvDcOiXjrpNPZgw q3N9TcpH9SJgZer2PcpzHLMijUgaNqCK0GuGPX1bLxTSA6YZJTq5IgMQzktlLxvGLG4txU 6g2ifcfa1pXR0qjjktqt5WUZ7Vo81Kw= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-528-oA7SCiGhMYCQ6Te-NdiSnw-1; Wed, 31 May 2023 05:38:08 -0400 X-MC-Unique: oA7SCiGhMYCQ6Te-NdiSnw-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B27553C11C69 for ; Wed, 31 May 2023 09:38:07 +0000 (UTC) Received: from ringo.redhat.com (unknown [10.39.208.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id E244E492B0A; Wed, 31 May 2023 09:38:06 +0000 (UTC) From: Robin Jarry To: dev@openvswitch.org Date: Wed, 31 May 2023 11:37:55 +0200 Message-Id: <20230531093754.134501-1-rjarry@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: David Marchand Subject: [ovs-dev] [PATCH v2] netdev-dpdk: Fix warning with gcc 13. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" GCC now reports uninitialized warnings from function return values. ../lib/netdev-dpdk.c: In function 'netdev_dpdk_mempool_configure': ../lib/netdev-dpdk.c:964:22: warning: 'dmp' may be used uninitialized [-Wmaybe-uninitialized] 964 | dev->dpdk_mp = dmp; | ~~~~~~~~~~~~~^~~~~ ../lib/netdev-dpdk.c:854:21: note: 'dmp' was declared here 854 | struct dpdk_mp *dmp, *next; | ^~~ NB: this looks like a false positive, gcc 13 probably fails to see the link between reuse and dmp in dpdk_mp_get(). Signed-off-by: Robin Jarry Reviewed-by: David Marchand --- Notes: v2: Fixed commit title and added note about possible false positive. lib/netdev-dpdk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index fb0dd43f75c5..e11508cd5c31 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -840,7 +840,7 @@ dpdk_mp_create(struct netdev_dpdk *dev, int mtu) static struct dpdk_mp * dpdk_mp_get(struct netdev_dpdk *dev, int mtu) { - struct dpdk_mp *dmp, *next; + struct dpdk_mp *dmp = NULL, *next; bool reuse = false; ovs_mutex_lock(&dpdk_mp_mutex);