Use the %pg format specifier to save on stack consuption and code size.

Signed-off-by: Christoph Hellwig <h...@lst.de>
---
 drivers/md/dm-integrity.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c
index eb4b5e52bd6ff..c58a5111cb575 100644
--- a/drivers/md/dm-integrity.c
+++ b/drivers/md/dm-integrity.c
@@ -1788,12 +1788,11 @@ static void integrity_metadata(struct work_struct *w)
                                                checksums_ptr - checksums, 
dio->op == REQ_OP_READ ? TAG_CMP : TAG_WRITE);
                        if (unlikely(r)) {
                                if (r > 0) {
-                                       char b[BDEVNAME_SIZE];
                                        sector_t s;
 
                                        s = sector - ((r + ic->tag_size - 1) / 
ic->tag_size);
-                                       DMERR_LIMIT("%s: Checksum failed at 
sector 0x%llx",
-                                                   bio_devname(bio, b), s);
+                                       DMERR_LIMIT("%pg: Checksum failed at 
sector 0x%llx",
+                                                   bio->bi_bdev, s);
                                        r = -EILSEQ;
                                        atomic64_inc(&ic->number_of_mismatches);
                                        dm_audit_log_bio(DM_MSG_PREFIX, 
"integrity-checksum",
-- 
2.30.2

--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel

Reply via email to