* [PATCH] dm integrity: Remove the unused variable bi_sector
@ 2023-01-31 6:09 ` Jiapeng Chong
0 siblings, 0 replies; 2+ messages in thread
From: Jiapeng Chong @ 2023-01-31 6:09 UTC (permalink / raw)
To: agk; +Cc: snitzer, dm-devel, linux-kernel, Jiapeng Chong, Abaci Robot
Variable bi_sector is not effectively used, so delete it.
drivers/md/dm-integrity.c:1738:13: warning: variable 'bi_sector' set but not used.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3895
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
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)
}
if (unlikely(dio->op == REQ_OP_DISCARD)) {
- sector_t bi_sector = dio->bio_details.bi_iter.bi_sector;
unsigned bi_size = dio->bio_details.bi_iter.bi_size;
unsigned max_size = likely(checksums != checksums_onstack) ? PAGE_SIZE : HASH_MAX_DIGESTSIZE;
unsigned max_blocks = max_size / ic->tag_size;
@@ -1752,13 +1751,7 @@ static void integrity_metadata(struct work_struct *w)
goto error;
}
- /*if (bi_size < this_step_blocks << (SECTOR_SHIFT + ic->sb->log2_sectors_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 -= this_step_blocks << (SECTOR_SHIFT + ic->sb->log2_sectors_per_block);
- bi_sector += this_step_blocks << ic->sb->log2_sectors_per_block;
}
if (likely(checksums != checksums_onstack))
--
2.20.1.7.g153144c
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [dm-devel] [PATCH] dm integrity: Remove the unused variable bi_sector
@ 2023-01-31 6:09 ` Jiapeng Chong
0 siblings, 0 replies; 2+ messages in thread
From: Jiapeng Chong @ 2023-01-31 6:09 UTC (permalink / raw)
To: agk; +Cc: Jiapeng Chong, dm-devel, Abaci Robot, snitzer, linux-kernel
Variable bi_sector is not effectively used, so delete it.
drivers/md/dm-integrity.c:1738:13: warning: variable 'bi_sector' set but not used.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3895
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
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)
}
if (unlikely(dio->op == REQ_OP_DISCARD)) {
- sector_t bi_sector = dio->bio_details.bi_iter.bi_sector;
unsigned bi_size = dio->bio_details.bi_iter.bi_size;
unsigned max_size = likely(checksums != checksums_onstack) ? PAGE_SIZE : HASH_MAX_DIGESTSIZE;
unsigned max_blocks = max_size / ic->tag_size;
@@ -1752,13 +1751,7 @@ static void integrity_metadata(struct work_struct *w)
goto error;
}
- /*if (bi_size < this_step_blocks << (SECTOR_SHIFT + ic->sb->log2_sectors_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 -= this_step_blocks << (SECTOR_SHIFT + ic->sb->log2_sectors_per_block);
- bi_sector += this_step_blocks << ic->sb->log2_sectors_per_block;
}
if (likely(checksums != checksums_onstack))
--
2.20.1.7.g153144c
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-01-31 8:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-31 6:09 [PATCH] dm integrity: Remove the unused variable bi_sector Jiapeng Chong
2023-01-31 6:09 ` [dm-devel] " Jiapeng Chong
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.