Skip to content

Commit

Permalink
lib/test_rhashtable: Remove set but unused variable 'insert_retries'
Browse files Browse the repository at this point in the history
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 <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jiapeng Chong authored and David S. Miller committed Nov 25, 2022
1 parent f72cd76 commit b084f6c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/test_rhashtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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 < 0)
return err;
}

Expand Down

0 comments on commit b084f6c

Please sign in to comment.