From nobody Sat Sep 13 19:03:49 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D67C5C38142 for ; Tue, 31 Jan 2023 06:10:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229646AbjAaGKy (ORCPT ); Tue, 31 Jan 2023 01:10:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229518AbjAaGKv (ORCPT ); Tue, 31 Jan 2023 01:10:51 -0500 Received: from out30-110.freemail.mail.aliyun.com (out30-110.freemail.mail.aliyun.com [115.124.30.110]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B42823B3EA for ; Mon, 30 Jan 2023 22:10:48 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R211e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045170;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0VaVVaz._1675145432; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0VaVVaz._1675145432) by smtp.aliyun-inc.com; Tue, 31 Jan 2023 14:10:44 +0800 From: Jiapeng Chong To: agk@redhat.com Cc: snitzer@kernel.org, dm-devel@redhat.com, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] dm integrity: Remove the unused variable bi_sector Date: Tue, 31 Jan 2023 14:09:41 +0800 Message-Id: <20230131060941.36690-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Variable bi_sector is not effectively used, so delete it. drivers/md/dm-integrity.c:1738:13: warning: variable 'bi_sector' set but no= t used. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3D3895 Signed-off-by: Jiapeng Chong --- drivers/md/dm-integrity.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c index 1388ee35571e..c62c21aadf32 100644 --- a/drivers/md/dm-integrity.c +++ b/drivers/md/dm-integrity.c @@ -1735,7 +1735,6 @@ static void integrity_metadata(struct work_struct *w) } =20 if (unlikely(dio->op =3D=3D REQ_OP_DISCARD)) { - sector_t bi_sector =3D dio->bio_details.bi_iter.bi_sector; unsigned bi_size =3D dio->bio_details.bi_iter.bi_size; unsigned max_size =3D likely(checksums !=3D checksums_onstack) ? PAGE_S= IZE : HASH_MAX_DIGESTSIZE; unsigned max_blocks =3D max_size / ic->tag_size; @@ -1752,13 +1751,7 @@ static void integrity_metadata(struct work_struct *w) goto error; } =20 - /*if (bi_size < this_step_blocks << (SECTOR_SHIFT + ic->sb->log2_secto= rs_per_block)) { - printk("BUGG: bi_sector: %llx, bi_size: %u\n", bi_sector, bi_size); - printk("BUGG: this_step_blocks: %u\n", this_step_blocks); - BUG(); - }*/ bi_size -=3D this_step_blocks << (SECTOR_SHIFT + ic->sb->log2_sectors_= per_block); - bi_sector +=3D this_step_blocks << ic->sb->log2_sectors_per_block; } =20 if (likely(checksums !=3D checksums_onstack)) --=20 2.20.1.7.g153144c