From patchwork Mon Sep 4 16:12:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 720002 Delivered-To: patch@linaro.org Received: by 2002:adf:d08b:0:b0:31d:da82:a3b4 with SMTP id y11csp1688711wrh; Mon, 4 Sep 2023 09:18:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGrlw5l30uXOX7mw6QUXqK498e41q3uUZH9G7zfhBmNIlycQuiMINrl2OGbX0S8da1DAGb2 X-Received: by 2002:a05:620a:2955:b0:76c:d2be:b7d with SMTP id n21-20020a05620a295500b0076cd2be0b7dmr11958827qkp.14.1693844305284; Mon, 04 Sep 2023 09:18:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693844305; cv=none; d=google.com; s=arc-20160816; b=PmbZoVZleb7xCk9fNwKrXNyEyO/JwpfETG/m2XDHw3eLPEpx+6qqrFz+wWqKp76VEn fag7xZscyY5vMTmiZWbo09jl/WS3nrjHqQYP0xpzu4OVpFQHHEimp/Bjt7CN9V6SUS/x pJdm5bVAmerFKnVqNo1wagcwD30xnDr7FK9mxwJP257f3vZmk5kCkEY9HrlKdJ2U2+8r i13NzyYn+jT4sV8pASn9FXS6w/1tTHrweU8JzAICJUwKEB/Ow5FEpQ4ACue/DnhRObwM SeRwWj3uaEytevswCpZytzjnJTdpQHVELJSemHPvJQ1W8atOLh9zynx+ipNR3oXUVaYi BGxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xGuryJTSyoRXnerBPgJM/pgbtWE/XseVwBkj0AvKIlk=; fh=yoeeTdiuJ4hfP62eFKx5QaPV8IKsa/Dl76YS7AWPRu0=; b=WpaLrtkpYLabfjU3ykg11uBfI7BivlmBHNvPTdOnOaY/I+fBWH+SXgskX9tGyZqEbI N9WY039sGZFTQUoYC3M/iXTU3lLutIp/WwEKfcC2FrBUMs9eS70xy+wZ0GWoyInFmo8j lQyb43+bW3Pd+0QVGwYf0j5eaamFN+GF9LMMx4UpV4IYMXJTM0Ijvp4TLB3FBcFeaEt0 VaqqrhnM5UYUA0kR32Suk4hDfEYgzMBA9DhMjl89rAdMrxSBJhcXdCmrqfibHVWpn9OC uw8hiC3+H0gZ2FN69NCCNayUe/+54LSO6Qfh7ejb+lVzJw9yFieCuI/KeXqYqvr+ujPX ti9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OCkTZhp+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id p19-20020a05620a22f300b0076f03e58b62si6204580qki.147.2023.09.04.09.18.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Sep 2023 09:18:25 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OCkTZhp+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qdCDL-000498-44; Mon, 04 Sep 2023 12:14:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qdCDI-0003tF-B9 for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:14:08 -0400 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdCDE-0007gz-Fp for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:14:07 -0400 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-98377c5d53eso235630666b.0 for ; Mon, 04 Sep 2023 09:14:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693844043; x=1694448843; darn=nongnu.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=xGuryJTSyoRXnerBPgJM/pgbtWE/XseVwBkj0AvKIlk=; b=OCkTZhp+xySDAelll8iDajpzKieCmyBn+f+MwFFAxDyuvalX+IeUHRS80a+dwKlzd8 J81sJnjEWByMdvS6ZWW05ZP2hmcxcgHB8T6YG9SfRDWMfUFSQ/VOAjKrkoDHlhHgZbaE /ccJ8wugRbePMIySRQm4vUaYmZb+mJJvYPBpkYUayIMSeWYALVWVaTK0oh1+biqZUmGn pKs66ALKLkyeGkYBfiT8ao7jxIWV9rq5TNnEuwrQ2kLsLEEgVP1uEnRX2jzL5bMctJpz MN8CoV0VyOAq6GnNsXoKBfOt82VzIWl/EJaAKWfMCCEEqNizLdSrc/KgWJo0YU88SSlk UV7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693844043; x=1694448843; 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=xGuryJTSyoRXnerBPgJM/pgbtWE/XseVwBkj0AvKIlk=; b=SHI/BxP7nmBahYjoC4S57eAXD8yoyTlpwqJyjtphhaoZD6zYEQwF62R79WlLbhzhhq MqkI/JUc4CPpA+aZpbMZCjQeJkq0S2zyYx+Jq9kKCNAKNa1kB1HIVGdldLWANYLN960e zETs85pMlgF9WN8nIdEAVa5LimfUo/bIivrx5tHgtpksRR16Iv4UV8D4mkkbbghnWGij pbJS39KlOuiEKLVxPXhACuPraYVNOd1UIRvMomOXHSOctto2HMMG/B9MDqUMVcLLd2Ub Zoav05fmB+xRM5t4CIm6iUu7AnfTWSnTBpZkFH4yBV22nvD/BsbLdnLGY2MNtnH561IM 3N/g== X-Gm-Message-State: AOJu0YyDPY8w5iC2nfxfWdvg4mp3WX40RgwZj3EbpenARLlDFYZmgjgR JVfjrPgn1d7eq04ZQMa7xAAPKw== X-Received: by 2002:a17:906:8a41:b0:9a5:d657:47e5 with SMTP id gx1-20020a1709068a4100b009a5d65747e5mr7429251ejc.49.1693844043140; Mon, 04 Sep 2023 09:14:03 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id f15-20020a1709067f8f00b009934855d8f1sm6371229ejr.34.2023.09.04.09.14.01 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 09:14:02 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Markus Armbruster , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , Akihiko Odaki , Dmitry Fleytman , Jason Wang Subject: [PATCH v2 15/22] net/eth: Clean up local variable shadowing Date: Mon, 4 Sep 2023 18:12:27 +0200 Message-ID: <20230904161235.84651-16-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904161235.84651-1-philmd@linaro.org> References: <20230904161235.84651-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::630; envelope-from=philmd@linaro.org; helo=mail-ej1-x630.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Fix: net/eth.c:435:20: error: declaration shadows a local variable [-Werror,-Wshadow] size_t input_size = iov_size(pkt, pkt_frags); ^ net/eth.c:413:16: note: previous declaration is here size_t input_size = iov_size(pkt, pkt_frags); ^ Suggested-by: Akihiko Odaki Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Eric Blake Reviewed-by: Akihiko Odaki --- net/eth.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/eth.c b/net/eth.c index 649e66bb1f..3f680cc033 100644 --- a/net/eth.c +++ b/net/eth.c @@ -432,8 +432,6 @@ _eth_get_rss_ex_src_addr(const struct iovec *pkt, int pkt_frags, } if (opthdr.type == IP6_OPT_HOME) { - size_t input_size = iov_size(pkt, pkt_frags); - if (input_size < opt_offset + sizeof(opthdr)) { return false; }