Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1206083pxf; Fri, 19 Mar 2021 01:21:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfqMbPslc1Lo8StDKuqlNR1nVwOP1CZinratq2m3/dIwAd0AwkeEJgbJzKFP/w134A+haK X-Received: by 2002:a05:6402:10c9:: with SMTP id p9mr8213584edu.268.1616142115299; Fri, 19 Mar 2021 01:21:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616142115; cv=none; d=google.com; s=arc-20160816; b=zW8tO507tjq1uazFQKwXrmgRd9F9V8fxGodN0KWgvqlx4ssF+43QZ+HmbEsIEj3lrq d9H9iSgA8ikSiYcTsd3EqFZBmL+uvk1lmp1PbGrBb2tkMQ9H8+9q0EKwPkYnXz6sfKlP +QfOmN6QD/LzbpUtxxwB48o54HWldIktPJv9wvk6Dcg8vYfbV68zHJMrq9XmmOyTpJCb J3OtMzntT3bJp+7JhmaMxXZABqwBl90frojIN4LAh06d0Zz5bn16EUhf4WPAtC0geq6H NVtZcpg/6ogjkyy89aYN3R80rdaJ+0eKjUGJJcik4YepT0AaKDmxhrElB9I5xqLhmASw kXAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=KbyC7uwe8Muh+4lv/tHkEw1eVX7y8Z4MQtOcF6Cjh/Y=; b=zmZerFCxLxF5V9Qaxxsiyniam4PBaFwGiUeFhIQDuB9HLEmQsOSJ/7U7PYL2nfcoq7 AyWr6N20xb5h7CajRYU7oR5NCT0x4ejtUU0zvCOljeEqA6b9NALOHTxA2FGRFlb/FEK5 nRKOe5x08AomC6Zu5Kf4GlNUG54JsH1cF16DvuJVYDjHpSDPj3oFB+QhWmVPCTJu7Ase fQq4XUNVPK8WPKVk3n2ZS6vhDm8dpEjPeRAzCC5lf1i5RdPdDPO4eLH+/2EVRxo/uI31 QbbvKMQK8hKjMk4R/lv7fz9M6EhToT8fjbXgW62X0JT+k5M6t8XkFTZnoQol01dQY4sS Lvxw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t8si3552568ejj.661.2021.03.19.01.21.31; Fri, 19 Mar 2021 01:21:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S234084AbhCSIUF (ORCPT + 99 others); Fri, 19 Mar 2021 04:20:05 -0400 Received: from out30-132.freemail.mail.aliyun.com ([115.124.30.132]:49425 "EHLO out30-132.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234076AbhCSITk (ORCPT ); Fri, 19 Mar 2021 04:19:40 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04420;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0USZ52Gl_1616141975; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0USZ52Gl_1616141975) by smtp.aliyun-inc.com(127.0.0.1); Fri, 19 Mar 2021 16:19:38 +0800 From: Jiapeng Chong To: agk@redhat.com Cc: snitzer@redhat.com, dm-devel@redhat.com, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] dm persistent data: Remove unused variable ret Date: Fri, 19 Mar 2021 16:19:30 +0800 Message-Id: <1616141970-123042-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following coccicheck warnings: ./drivers/md/persistent-data/dm-btree-spine.c:188:5-6: Unneeded variable: "r". Return "0" on line 194. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/md/persistent-data/dm-btree-internal.h | 2 +- drivers/md/persistent-data/dm-btree-spine.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/md/persistent-data/dm-btree-internal.h b/drivers/md/persistent-data/dm-btree-internal.h index fe073d9..d0c5591 100644 --- a/drivers/md/persistent-data/dm-btree-internal.h +++ b/drivers/md/persistent-data/dm-btree-internal.h @@ -83,7 +83,7 @@ struct shadow_spine { }; void init_shadow_spine(struct shadow_spine *s, struct dm_btree_info *info); -int exit_shadow_spine(struct shadow_spine *s); +void exit_shadow_spine(struct shadow_spine *s); int shadow_step(struct shadow_spine *s, dm_block_t b, struct dm_btree_value_type *vt); diff --git a/drivers/md/persistent-data/dm-btree-spine.c b/drivers/md/persistent-data/dm-btree-spine.c index 8a2bfbf..dd2ff3c 100644 --- a/drivers/md/persistent-data/dm-btree-spine.c +++ b/drivers/md/persistent-data/dm-btree-spine.c @@ -183,15 +183,13 @@ void init_shadow_spine(struct shadow_spine *s, struct dm_btree_info *info) s->count = 0; } -int exit_shadow_spine(struct shadow_spine *s) +void exit_shadow_spine(struct shadow_spine *s) { - int r = 0, i; + int i; for (i = 0; i < s->count; i++) { unlock_block(s->info, s->nodes[i]); } - - return r; } int shadow_step(struct shadow_spine *s, dm_block_t b, -- 1.8.3.1