From patchwork Mon Jul 12 21:55:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 473142 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp3342946jao; Mon, 12 Jul 2021 14:56:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynR1V8Rbo5I20G04VV3K7Hd/Wr77tziAdehp7LgOUC+mzqdZ+NLSvBnovm0wHTnBe8YOeN X-Received: by 2002:a05:620a:4146:: with SMTP id k6mr852635qko.219.1626126992491; Mon, 12 Jul 2021 14:56:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626126992; cv=none; d=google.com; s=arc-20160816; b=J2YRaAix5wHF+x8x1n3z6ja5Hy1PCJDxksA2Ma7fMTNOj7I6wmBHA8tuizuiXBBbTk y+OtEkz/665WHm2EP4RItkpzWKDuybOwRr9m+Po8vm3PfWr58AUb8z/KhkegghoQiuHY XvJbHiDCWq5AJKG83D+WW0ZHQOjJHdeQpib6CB3c/yblSjObtRpjeT/wDkN31BXIaS7z DSLVJnvMoU28W66Nn0c/bou2gEJ4j1by8AS8m8pLtRfBob6/jGAwoGhHrpNugroMj3oA 0AtvOjnHMXwAdbYoy/8B0FbNN4cjut2vQj7lZPgOtH2fvUsPXWRoeZolrtpskF+T8b2F vLvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=h4VDfQcFJ7YgMKSWd754t3G1Gz4yG0zsxrrNOOR5Dw8=; b=Tun1UWz+kLn+Nw+7aAUlvlc7/QAsPgQ1NirUEwgTMwTjh+xgtSONWhvQvgckaRN4al B4O+YR/kItDajA0swod2Hqc9/dWTCfq+Bs73mAd/KWBdW2tt/uDmEptIc9aaGcB2/gEj 3CtxYsO/3nyh3/iGXhfZV933GOfweso9+oH0b1oyhWZHWcywz/vleJhHX4DuTrdD42N0 4xRo1wolvL7LjKv62BGgbfHT8pPbnwThT64QER55Q8AQi8xIa00ZC/EZfAfUs6rzuRPO NuyBOn1SQ+jZxeDNyCadOhHriFBcaBcFXjg4ECFQovdvISnPf0rDCCmhrcF9jEvDly4H UbeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fb793n8m; 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 c20si14031645qtd.246.2021.07.12.14.56.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 12 Jul 2021 14:56:32 -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=fb793n8m; 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]:57810 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m33uh-00013J-OC for patch@linaro.org; Mon, 12 Jul 2021 17:56:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50664) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m33tv-0000aA-Jn for qemu-devel@nongnu.org; Mon, 12 Jul 2021 17:55:43 -0400 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]:38791) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m33tt-0006rv-Df for qemu-devel@nongnu.org; Mon, 12 Jul 2021 17:55:43 -0400 Received: by mail-pg1-x532.google.com with SMTP id h4so19728607pgp.5 for ; Mon, 12 Jul 2021 14:55:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=h4VDfQcFJ7YgMKSWd754t3G1Gz4yG0zsxrrNOOR5Dw8=; b=fb793n8maWYopelOndZlhmLQd6fdjBsVcayxajgZEqV/r11fnTNExQgx58eFQGrs7Q X+zL8fEpvuJa5SuVZ2Y+34GpG/XHtSXbze5LqP171zdkT+wTwQY6XpnDi8nMu8QFTHpf wOJeQ8QmAsJHIEMqN2DkkWmeowgZeaJuEF2Z78mszDjaCa49P1uV8EgnlwjlEghXdKBM zf2B/tOBkEaLUY9zUE5t3etRHHytV5UJtA/KddHgM914ccTVVce5mBDn+kO9l/FyC5xC CItf3tOlzW5UfoXA3OvgANJkqRDJTLMteLaB1wc0QLZtMctWv6Ue7qB3OBLltasOM/eL /XOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=h4VDfQcFJ7YgMKSWd754t3G1Gz4yG0zsxrrNOOR5Dw8=; b=ZTrF0GTtMKyjMuWR2QC66gvFw1dsUmC1IRd0bgrPxWlWY6TXKEalItUqooabGs/pFH Tsmgc6ozilZ+lsaOBJoFp+fVNuie4npz0eO3TVio1icc2SoroM4N1OHzqh3Mi9rAFoIG 4Eug7T1XtjDffo1wl62jiik8pPUmoU/4iSebvEDuDV7UCkokgvdBCdWEiubRHKoXDiWf 5NMbUqxxkmskxvBAr5MPv04AjyDMHHKSsYjqd6Q3SepEWeQ1gALpfO1o0dLoSLxyeUGS 58ABO6O5DKVkZhmjD7cs4kFgWts+k5fw41+iyYfC0DOq3lIYExxbjqdK/dke6QzSqpQd Qo2g== X-Gm-Message-State: AOAM530FEcU0bT3BkpBkOe3329wOmSD7Zu8SAV92OLqRXeHPGPxj+tTf jrWZRo2sdRbuMu5DPUzyVOukWUwW1apa8g== X-Received: by 2002:a05:6a00:1411:b029:302:d9d6:651d with SMTP id l17-20020a056a001411b0290302d9d6651dmr1294472pfu.56.1626126939806; Mon, 12 Jul 2021 14:55:39 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id d2sm376932pjo.50.2021.07.12.14.55.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 14:55:39 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 04/11] net/checksum: Remove unused variable in net_checksum_add_iov Date: Mon, 12 Jul 2021 14:55:28 -0700 Message-Id: <20210712215535.1471256-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210712215535.1471256-1-richard.henderson@linaro.org> References: <20210712215535.1471256-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::532; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x532.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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jason Wang Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" >From clang-13: ../qemu/net/checksum.c:189:23: error: variable 'buf_off' set but not used \ [-Werror,-Wunused-but-set-variable] Cc: Jason Wang Signed-off-by: Richard Henderson --- net/checksum.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.25.1 diff --git a/net/checksum.c b/net/checksum.c index 70f4eaeb3a..68245fd748 100644 --- a/net/checksum.c +++ b/net/checksum.c @@ -186,12 +186,11 @@ uint32_t net_checksum_add_iov(const struct iovec *iov, const unsigned int iov_cnt, uint32_t iov_off, uint32_t size, uint32_t csum_offset) { - size_t iovec_off, buf_off; + size_t iovec_off; unsigned int i; uint32_t res = 0; iovec_off = 0; - buf_off = 0; for (i = 0; i < iov_cnt && size; i++) { if (iov_off < (iovec_off + iov[i].iov_len)) { size_t len = MIN((iovec_off + iov[i].iov_len) - iov_off , size); @@ -200,7 +199,6 @@ net_checksum_add_iov(const struct iovec *iov, const unsigned int iov_cnt, res += net_checksum_add_cont(len, chunk_buf, csum_offset); csum_offset += len; - buf_off += len; iov_off += len; size -= len; }