Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B476AC38142 for ; Wed, 1 Feb 2023 00:17:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231624AbjBAARy (ORCPT ); Tue, 31 Jan 2023 19:17:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230011AbjBAARw (ORCPT ); Tue, 31 Jan 2023 19:17:52 -0500 Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AA554345E for ; Tue, 31 Jan 2023 16:17:50 -0800 (PST) Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id D50E5421FC for ; Wed, 1 Feb 2023 00:17:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1675210667; bh=B79xjy+K/93G68irDU5evQCBz5+5dY2qXWejhUcP4yM=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=uGTwSBWtjLuIqZyuJVNGKdPoB7mtWowaGOu5rXQTlJa/X31Hw7vBN498eD2z5eHay UikaPv3hnykLPEb28jAwagp4+zwNjSvIG88EySDnb3iIacGvq/HGKawMNdROf0zdcP cwuS1pwa+eFemqtKAboWqWXjfffUjN1FUfJXXQArSaTLUYPC2RTTHu2xviqpB3uRZ6 q4kVRN+L7rkRBTHlgkGiuUUNckVtepDc+RpllRjL5RCLCApPTSswz3JuZccwKqehUG 1z1Cx5sJnt+6Q9DjoDRK/UpwgRiaKk/kKkGB5yIBUDegCBtrjlWKTvvwg6sdbLFGaw J0O9xm1882zUw== Received: by mail-wm1-f69.google.com with SMTP id k17-20020a05600c1c9100b003dd41ad974bso156162wms.3 for ; Tue, 31 Jan 2023 16:17:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=B79xjy+K/93G68irDU5evQCBz5+5dY2qXWejhUcP4yM=; b=uF5WhZ75yy8430yfOVdShisArYRcHIXPbR6hLbaowagnfc64Uykg0CCSSt3wWpWkoO Y3wXLFzkaLoNHdU1KKleFVQ4GSbKUdlYvP392OYOfLYfIBRhX2/Js1G0t2o8anrjqoJJ rSFQw1VpWeNuDcfGkcVBRQ2IC64dyjH5guPExtI08MVy4RL0D/boHenqGAxI3LCluemn Ky/Q3rU8kSheKHq1fNwUnTtvXvcI2I9Cs3NlsT6aGLnALDqvsQaEthOOrC/Z+KBvLPqp GfqZeo6AtoInia7UhEgGlzGN7MzGXsIKuz697S1Oa3fStq8KFr89onKLRhSvOLtVz3X9 n4fg== X-Gm-Message-State: AO0yUKU7seMV/jbzRy3VKiDy9WOOlOsqnL45lyRb2lJIrYJ/auO0J1mc xuL9MFdkhl77Tc+p5cxjvvxmTwnFCk0+XW6yGEbwV7wH8ZFlFp031XWa6lQRvJlDl+/Z30T5iVT Z22tqKwIvk1pjGd6ipQ7l4JVsnnTYo+ZO1n+55/KDqQ== X-Received: by 2002:a05:600c:3c9b:b0:3dc:46e8:982 with SMTP id bg27-20020a05600c3c9b00b003dc46e80982mr117939wmb.19.1675210667584; Tue, 31 Jan 2023 16:17:47 -0800 (PST) X-Google-Smtp-Source: AK7set8m3rFOUfn/2s9rRm1ZfRJ7ufmOaC/r+T7Sr9ucuwaqVN8rvqtqmrDhvLO6w1KBkptDz3dggA== X-Received: by 2002:a05:600c:3c9b:b0:3dc:46e8:982 with SMTP id bg27-20020a05600c3c9b00b003dc46e80982mr117926wmb.19.1675210667336; Tue, 31 Jan 2023 16:17:47 -0800 (PST) Received: from qwirkle.internal ([81.2.157.149]) by smtp.gmail.com with ESMTPSA id n6-20020a7bcbc6000000b003d237d60318sm108925wmi.2.2023.01.31.16.17.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 16:17:46 -0800 (PST) From: Andrei Gherzan To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan Cc: Andrei Gherzan , netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net v4 1/4] selftests: net: udpgso_bench_rx: Fix 'used uninitialized' compiler warning Date: Wed, 1 Feb 2023 00:16:10 +0000 Message-Id: <20230201001612.515730-1-andrei.gherzan@canonical.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This change fixes the following compiler warning: /usr/include/x86_64-linux-gnu/bits/error.h:40:5: warning: ‘gso_size’ may be used uninitialized [-Wmaybe-uninitialized] 40 | __error_noreturn (__status, __errnum, __format, __va_arg_pack ()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ udpgso_bench_rx.c: In function ‘main’: udpgso_bench_rx.c:253:23: note: ‘gso_size’ was declared here 253 | int ret, len, gso_size, budget = 256; Fixes: 3327a9c46352 ("selftests: add functionals test for UDP GRO") Signed-off-by: Andrei Gherzan --- tools/testing/selftests/net/udpgso_bench_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/udpgso_bench_rx.c b/tools/testing/selftests/net/udpgso_bench_rx.c index 6a193425c367..d0895bd1933f 100644 --- a/tools/testing/selftests/net/udpgso_bench_rx.c +++ b/tools/testing/selftests/net/udpgso_bench_rx.c @@ -250,7 +250,7 @@ static int recv_msg(int fd, char *buf, int len, int *gso_size) static void do_flush_udp(int fd) { static char rbuf[ETH_MAX_MTU]; - int ret, len, gso_size, budget = 256; + int ret, len, gso_size = 0, budget = 256; len = cfg_read_all ? sizeof(rbuf) : 0; while (budget--) { -- 2.34.1