Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp4061499iog; Tue, 28 Jun 2022 08:14:30 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sbBYgyZbl6p9POE2JdkxNEf+sTwy/aZyYiCFXA5zJzH5378qOv3wWTHDDP1II+LQvEyPZ6 X-Received: by 2002:a17:902:d2c5:b0:16a:5204:304f with SMTP id n5-20020a170902d2c500b0016a5204304fmr4173124plc.98.1656429270240; Tue, 28 Jun 2022 08:14:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656429270; cv=none; d=google.com; s=arc-20160816; b=lr+Q+Jku/ZlbfGXGdmW6CKIJNCzJyKz/0cX3JATznvT9aDn8UaWHbnxlKqIH11I7M2 9avEzLgvVL8M8wYCSPCw81rydkC5iMrQrSDEcvmlJr5lKXoyrdbWsmOhPzz9jEDRl64K X+MUDlTQAgrmJTf5wqS5ze82+aTLcqC6sndw1F/zOrR7xDSExTuXpvv8Sabcz0RGNCl4 dHHuXzeSDZ9WpWFo0OzmSeoov7pO+y+ORP/HvC1K++GukQMrZKin9pm27uQQoDm62nsl l3g0ehI21BKqheuYkWO1xh+vN8boitx78YcduirlUrcTflKf0DcgtQx4WnEbUyaJPOoU +cOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=l1D/ej0/nC978gwemE1J7bKjwax9zdRenELB/Dp44DU=; b=LMDipz/iwAuSnEbBQiHNuFudhND3aHz6gXirZpqZ4omegfcswA/BPrx89kjr4BEO/D afYNTEkZ9dfpXzUqTBgSFM54c2W/fQYAWQxnv7Sy4MS0ulrHXT0LU+xTpjKR799nMMxl 9CT4C2MPJGqtqjsMVQVJSGoCSiqAg2bz7iQqpmi7OBJEVko4+mCMhpuW0QHTAntFX+dk aWLCucc9Qz9PF74jVWgpfPdHGy+f/RlSFvJcWcffy9AuwaB7RHxPVhHGyHw6L21r15Le os1/SnsCAPBYkeY0NUypGV2B6u1iQ3NxXAEIzA1/KI2iaEIXT8QZI+UDhevGarg7ohKw QWzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=RoVm6ZFf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o20-20020a056a0015d400b005253974cdd0si21770340pfu.222.2022.06.28.08.14.10; Tue, 28 Jun 2022 08:14:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=RoVm6ZFf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347473AbiF1OyO (ORCPT + 99 others); Tue, 28 Jun 2022 10:54:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347459AbiF1OyK (ORCPT ); Tue, 28 Jun 2022 10:54:10 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3E5139A; Tue, 28 Jun 2022 07:54:08 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id b26so5688765wrc.2; Tue, 28 Jun 2022 07:54:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=l1D/ej0/nC978gwemE1J7bKjwax9zdRenELB/Dp44DU=; b=RoVm6ZFftFHJ6zdKmNct/gRFxbvhEkOzLe2D4OjqmZfWV3M+tREP7LTjheZB5zLD91 XYJIXFgAxfP1EMttzqvhFO6CDk9Q5qB10MCLJHZNo7vjnPkFxAMZgWPlqVGB0HA/xWT6 ghKCUKqFUYwDjZ4adnlo84bC3gD14irFPfVqOazICHXwe/Pga3pfj22+inrCth/YeCBI M6VkNkzBfw8gpn1VU6L/2xvIKYiTFBuSaOiKdBW84KAE9IMdCJszboMsWbzomU8a6AJ9 iW6V1NaPXFDy/KjqZ+Obikr5oWmsUmt0dRw/3dTyx1B6tEXLXlC3cKddoushEKNAJ5R1 U2TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=l1D/ej0/nC978gwemE1J7bKjwax9zdRenELB/Dp44DU=; b=FE2MgyfQhx0Kh5k5J3YuyoQqKDPbn/wMZFk7soJ8IYLBpFiXtdiQ1XMOQ4cYh8hx7R OkY0PXkvH1qSFakRutZA4PNr1GR4wb4CHxpVs0yHTw/EqYI4Ty+JBJqtnfFF+gcg1QKZ YDghrKCrmuWk6JFgQEHQBiHObwiBtxKrTKFKoaveNwCAnt/6OIim+OqagI0K2u1pFpHj IwRYps4IavP8xyur/Ec3z7IDJvZfk5hlk1YpyRp4+tZBqdWTn26gbhTImDEDEj1OD+ZE iZKk2cOfWccOd81DawnvlYAo+HLwGlhTCYvesL0Gu2IEZyeVNHLIQno0bsHEtiXikNLe 7TKg== X-Gm-Message-State: AJIora+Kl8+URZlRMYwVytNUIwTiV7PLVsltW4/FZvlpjNglLUGb/Iuo 4Tg897baz5PvE8JXF6Zm3NA= X-Received: by 2002:a05:6000:1869:b0:21b:933c:7e2 with SMTP id d9-20020a056000186900b0021b933c07e2mr19221735wri.252.1656428047332; Tue, 28 Jun 2022 07:54:07 -0700 (PDT) Received: from localhost (cpc154979-craw9-2-0-cust193.16-3.cable.virginm.net. [80.193.200.194]) by smtp.gmail.com with ESMTPSA id r21-20020a05600c35d500b003a02f957245sm22038617wmq.26.2022.06.28.07.54.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jun 2022 07:54:06 -0700 (PDT) From: Colin Ian King To: "David S . Miller" , Hideaki YOSHIFUJI , David Ahern , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ipv6: remove redundant store to value after addition Date: Tue, 28 Jun 2022 15:54:06 +0100 Message-Id: <20220628145406.183527-1-colin.i.king@gmail.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is no need to store the result of the addition back to variable count after the addition. The store is redundant, replace += with just + Cleans up clang scan build warning: warning: Although the value stored to 'count' is used in the enclosing expression, the value is never actually read from 'count' Signed-off-by: Colin Ian King --- net/ipv6/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 0be01a4d48c1..1d6f75eef4bd 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -5934,7 +5934,7 @@ int rt6_dump_route(struct fib6_info *rt, void *p_arg, unsigned int skip) rcu_read_unlock(); if (err) - return count += w.count; + return count + w.count; } return -1; -- 2.35.3