Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2247997pxm; Fri, 4 Mar 2022 12:16:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJzqon6SB92RwOXckts+B1zyeYui4VN5AfC3eU82AmZZWkct+9zyB/XtR0jw2w3lPrRuHgjW X-Received: by 2002:a17:90a:a78c:b0:1b8:b769:62d0 with SMTP id f12-20020a17090aa78c00b001b8b76962d0mr327788pjq.227.1646424996275; Fri, 04 Mar 2022 12:16:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646424996; cv=none; d=google.com; s=arc-20160816; b=PupceVik9XSGCnr0oI4j+laD8rtsnksnulQyttUiEyHs/oebJdSpYdUPj/k7SzdqzQ Ws59OZ9F9Z55100daWJDPW2UHj34f+Dc6CAcvN9zoiYeaaI5E6srTUUqALL4OQQXkYnF gOluUhM7nJNoc4hJyysCCf/ddmATtglyDtagBHSs072L/ScNGZ+3i7XUa3CTHAm7u2Cf GcA9oqHPL06PTVPgFlyVXavs8g/0AFwdLynUhHAwzZr6LBujR/GcDygrY0OMP5XDGa2k wcEHcenoCNqrZ741jI6aHDBTA7b6wCbKxB+o+QXZcUIdz6kPDTfESToruLyyQzPTXG/s jrRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=FfvqGUpQau2mUj9oxmV6eCym+RkFxYMrHcdaoyXdgWA=; b=qnl56ReucplyE40JHLlHZz05TH7R8Thv9Bf1sirBUd4Nh74Hdls8DccVTCfQbLoLYa qH/8JY7bJ6nwjV4+bv06c6wbBdBvPA/wqaAWTo68/adh/vwJCJiyXZIaMv5YcDdn9Jrs caecywEEPwGcusapEmO0toNSyjNt9CQWD6s1YvtV+AvEemWzApk4JXcS0UOsyxQjzqCa W7HzP24twkg11NIgLpT6p9Ig9KCRJciy12HKiwnvg3UwWHV1K6ESJf+qf6EhODliVFP5 9pw+MfBBgRb2m7LNHNxp4fYcDnJwIZR7Wd18tSLuL58G8DvvsniLH6TshLC0cvQ2/FwB ysHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=VI6Tb4Sb; spf=softfail (google.com: domain of transitioning linux-ext4-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id oc10-20020a17090b1c0a00b001bd14e03052si466776pjb.42.2022.03.04.12.16.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Mar 2022 12:16:36 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-ext4-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=VI6Tb4Sb; spf=softfail (google.com: domain of transitioning linux-ext4-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3A7A3136879; Fri, 4 Mar 2022 11:29:09 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241441AbiCDSCM (ORCPT + 99 others); Fri, 4 Mar 2022 13:02:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241059AbiCDSCJ (ORCPT ); Fri, 4 Mar 2022 13:02:09 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BD451C2DAD; Fri, 4 Mar 2022 10:01:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=FfvqGUpQau2mUj9oxmV6eCym+RkFxYMrHcdaoyXdgWA=; b=VI6Tb4SbyJ/XidKlKBvh06zmZr MMqnFeVNFrvKsefXlYmQSBJL0R1zHfhumwVawoEQEFw5XEyE5O0u8URvvkDKqtC7sHBfw2VCq0k1N AhZV0btO/9uUbsYemruKfiu/uHs4VFkAsttMZvgod8wCuK+Z2e8xzHIu0Z4lGkgqT3ZHzqEys6uDj 71JJsqxNp1e5PLUQDRa0cC4Sh8fWOEKm/hFqxNry7sVGk2TDL/N3icA8Sk65WtYQiMxCb/X+wMjM9 LN1qQAVGXu42Yx2wiFznVGlLIe86SyOHFKJs9cXVkvIxVdMNnBgxrSd3jwXMxU+PjVkA05BNNfHap Xh1mJGQQ==; Received: from [2001:4bb8:180:5296:cded:8d4b:ace6:f3c] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nQCEw-00BUnE-81; Fri, 04 Mar 2022 18:01:18 +0000 From: Christoph Hellwig To: Jens Axboe Cc: Song Liu , "Theodore Ts'o" , linux-block@vger.kernel.org, dm-devel@redhat.com, linux-raid@vger.kernel.org, linux-ext4@vger.kernel.org Subject: [PATCH 04/10] dm-crypt: stop using bio_devname Date: Fri, 4 Mar 2022 19:00:59 +0100 Message-Id: <20220304180105.409765-5-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220304180105.409765-1-hch@lst.de> References: <20220304180105.409765-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Use the %pg format specifier to save on stack consuption and code size. Signed-off-by: Christoph Hellwig --- drivers/md/dm-crypt.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index a5006cb6ee8ad..e2b0af4a2ee84 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -1364,11 +1364,10 @@ static int crypt_convert_block_aead(struct crypt_config *cc, } if (r == -EBADMSG) { - char b[BDEVNAME_SIZE]; sector_t s = le64_to_cpu(*sector); - DMERR_LIMIT("%s: INTEGRITY AEAD ERROR, sector %llu", - bio_devname(ctx->bio_in, b), s); + DMERR_LIMIT("%pg: INTEGRITY AEAD ERROR, sector %llu", + ctx->bio_in->bi_bdev, s); dm_audit_log_bio(DM_MSG_PREFIX, "integrity-aead", ctx->bio_in, s, 0); } @@ -2169,11 +2168,10 @@ static void kcryptd_async_done(struct crypto_async_request *async_req, error = cc->iv_gen_ops->post(cc, org_iv_of_dmreq(cc, dmreq), dmreq); if (error == -EBADMSG) { - char b[BDEVNAME_SIZE]; sector_t s = le64_to_cpu(*org_sector_of_dmreq(cc, dmreq)); - DMERR_LIMIT("%s: INTEGRITY AEAD ERROR, sector %llu", - bio_devname(ctx->bio_in, b), s); + DMERR_LIMIT("%pg: INTEGRITY AEAD ERROR, sector %llu", + ctx->bio_in->bi_bdev, s); dm_audit_log_bio(DM_MSG_PREFIX, "integrity-aead", ctx->bio_in, s, 0); io->error = BLK_STS_PROTECTION; -- 2.30.2