Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6809970rwb; Tue, 22 Nov 2022 20:12:47 -0800 (PST) X-Google-Smtp-Source: AA0mqf5VOiDIn55j/cGjsH6xKwxltvfvYmeeeoCuo4bxNMSsumZaypk9XwyHVyOF0PLBjJlvKJ+x X-Received: by 2002:a17:906:60c4:b0:7a2:36c7:31ea with SMTP id f4-20020a17090660c400b007a236c731eamr7587934ejk.210.1669176767437; Tue, 22 Nov 2022 20:12:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669176767; cv=none; d=google.com; s=arc-20160816; b=VmXqVj2ea1gLN0+j7Dpc1GvHw0c+MjF5nnNdozA7l8PigZriPRqvfFoYB0Kdy+HoS/ V5dhNfmgjoKE3EWIQF0cBbx67SZEECWtI+4UxYhpwpTets2eC9ntqUy0h9R63L3biORI /0gfgNaZ3akPuzv//7K+oXoZuvhHBzZbOgvy4kKlNFXn5sfU5Lky6nWkhene60HlMu+m fdPExV6pAzPbgugzNEA+ak/lkCZsGufZcdFSZrx71JW58E9GUF0PuhK/7wdqD6BsO+9M WCtJK8Az6OG+nqv4R09BlZ629dZLEFEPy9RGY/fcBbB3vEi1Wp49XOXnQVGJZnB5rNMK paHg== 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; bh=1IMogDDuyHDobePoH5zW5I1O+NXiNP3jh1ZG/Sk/jKo=; b=HCUcG435BAOCtCYVtq7mLxxyvJJTtijTv7R4UUTSMkuKm7hyVs1gallHKUeDJfbbVV FFmTSIYplTUG6T5UWinKjvE8AQE/+r0jC4+rZM5FKCV63vHR5DI5k/Go95ybHyyZg9Mc 56Po2II7OJtB7l51/n731Pi9dIVViKGZhb9BzyriK/kYe1e+1pIidr6Wka1ymsoCVTBY O4HHCEKK4IYgowbjZ7fWoojcxqSKb3OFf3bAPyPvfqrHDf57afMMTnPSB57WzoKtKoa9 oKUsehi/2f+Ol41T1yUep5NnPtz0aW4qOF5c5ArNhaY1R7Bls+t0c5J/f8UvT8ygg7Mc b0Cg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f9-20020a056402354900b00462f85ee700si14142065edd.65.2022.11.22.20.12.15; Tue, 22 Nov 2022 20:12:47 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235661AbiKWEAK (ORCPT + 89 others); Tue, 22 Nov 2022 23:00:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234375AbiKWEAI (ORCPT ); Tue, 22 Nov 2022 23:00:08 -0500 Received: from out30-133.freemail.mail.aliyun.com (out30-133.freemail.mail.aliyun.com [115.124.30.133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD4C1E0CAD; Tue, 22 Nov 2022 20:00:03 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046051;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0VVV17LO_1669175993; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0VVV17LO_1669175993) by smtp.aliyun-inc.com; Wed, 23 Nov 2022 12:00:01 +0800 From: Jiapeng Chong To: tgraf@suug.ch Cc: herbert@gondor.apana.org.au, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] lib/test_rhashtable: Remove set but unused variable 'insert_retries' Date: Wed, 23 Nov 2022 11:59:51 +0800 Message-Id: <20221123035951.10720-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL 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 Variable 'insert_retries' is not effectively used in the function, so delete it. lib/test_rhashtable.c:437:18: warning: variable 'insert_retries' set but not used. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3242 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- lib/test_rhashtable.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/test_rhashtable.c b/lib/test_rhashtable.c index 6a8e445c8b55..a7bf3b40b67b 100644 --- a/lib/test_rhashtable.c +++ b/lib/test_rhashtable.c @@ -434,7 +434,7 @@ static int __init test_rhltable(unsigned int entries) static int __init test_rhashtable_max(struct test_obj *array, unsigned int entries) { - unsigned int i, insert_retries = 0; + unsigned int i; int err; test_rht_params.max_size = roundup_pow_of_two(entries / 8); @@ -447,9 +447,7 @@ static int __init test_rhashtable_max(struct test_obj *array, obj->value.id = i * 2; err = insert_retry(&ht, obj, test_rht_params); - if (err > 0) - insert_retries += err; - else if (err) + if (err) return err; } -- 2.20.1.7.g153144c