Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp372658imw; Tue, 12 Jul 2022 22:57:54 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sELH7tAJXLaci1spE1GqBXcPpsamU04mSzmtVKDTxfB+pEdmE/2iQ8ghWcYxhZQEJ0KiHT X-Received: by 2002:a17:90a:9f01:b0:1ef:76bd:e46c with SMTP id n1-20020a17090a9f0100b001ef76bde46cmr1975730pjp.197.1657691874498; Tue, 12 Jul 2022 22:57:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657691874; cv=none; d=google.com; s=arc-20160816; b=JYeArdZM3jfUNiDrSrG5j1DYGwdg5rqFm1W2IEF9yAzd2CtsipdUg5Ahw8V7f0/XHh A2DkVSQ48uEO6mrNNPsHoaQY0zLMKXdEtQHjQgFJEbjNJ+2EQL8s9DGxieQ9Cva3FsN7 0rbgYMOetd3zwc9CVmWpHZiwCSNOeV3V4tIr3akucSE2+FYHpNuJlPoONoyIWNsmq29K 8te4GUpNd3KFuGi9ELUSIS2kfZTqpz92XfQVNZ2SNeYKTRGcvDjLHYvWUsP8z9e+SoYJ f7jFHegBBTGBEpgzZWiSPNR9FPelk6pqvAiDnxLZo0o5RLma2z0AEFj3oygfb/+1uG44 LRTA== 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=+oupOjpjN539hy7C7mOoKBMVZDA7YOt+U1a+XjhL5Ns=; b=DqCXh49FLMXaZ0DP7ZJ5ptYUNngj2a49S5+o0tQYb2Qd+PDzQfNsV/EjXIlQn3TW2x 2DnEpUwYs0Rk1MjUw2MrRSvFfDVvgtMotDnpUQOdaqECLfejl30jwOfZ82TqZBrLVkAa ElhSDxcZXob2eAyM1of9abUF3qS0rK7r4ZkQ58bNfZPgSK9P19GfAabTGHE29CXVTx+V lHyVnKZNAvvWPKIJVgPI027Xg6eaqGxZX6VLrxCga6Wdoblo552oDJtBpyMJ3pxmiozI J/TKqVBL5003evoV0XTgGllZ4mOKUgbHvzhR00d1oEUEAy3YEoMspdAEfC0y/N0BNjrS EEOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=SppXqYL9; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s78-20020a632c51000000b004160a244062si9431755pgs.311.2022.07.12.22.57.42; Tue, 12 Jul 2022 22:57:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=SppXqYL9; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234189AbiGMFxl (ORCPT + 99 others); Wed, 13 Jul 2022 01:53:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232016AbiGMFxj (ORCPT ); Wed, 13 Jul 2022 01:53:39 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEDCB388; Tue, 12 Jul 2022 22:53:32 -0700 (PDT) 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=+oupOjpjN539hy7C7mOoKBMVZDA7YOt+U1a+XjhL5Ns=; b=SppXqYL9lOHjNHJFVIsh0T/5NK thTYqttsVuX9ral09ViQiJsG0BqI+m2Y6uMyPhwe2AVn+9jbprGRivJH9ddWe5e2zJpp3Uqj8X/qA h/p+Hima0jwo2ow4lUwnJfGygYuJ7ry7o19DW0r5NP0HfYsde0cnH77T5+Ad03RQFoqtOH8QYa4Rp KOMLvHbUs0O6xMh7bWvgY6cyW6WS9V9UjUrnbbsUmymRzVqe91SGDWq2itxqUTJXBR7JinVMSDJoA d2b+wMFDOmjP0AHja00eSStrbMdsyqy8MDxoDBE0tR8Jembbeu9Acs0rIrPBoHY4FqswpEbh65DTl J6OtNZLQ==; Received: from ip4d15c27d.dynamic.kabel-deutschland.de ([77.21.194.125] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oBVJN-000NOa-LE; Wed, 13 Jul 2022 05:53:26 +0000 From: Christoph Hellwig To: Jens Axboe Cc: =?UTF-8?q?Christoph=20B=C3=B6hmwalder?= , "Md. Haris Iqbal" , Jack Wang , Song Liu , "Theodore Ts'o" , Andreas Dilger , Jan Kara , Mark Fasheh , Joel Becker , Joseph Qi , linux-block@vger.kernel.org, drbd-dev@lists.linbit.com, linux-raid@vger.kernel.org, linux-ext4@vger.kernel.org, ocfs2-devel@oss.oracle.com Subject: [PATCH 2/9] block: stop using bdevname in __blkdev_issue_discard Date: Wed, 13 Jul 2022 07:53:10 +0200 Message-Id: <20220713055317.1888500-3-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220713055317.1888500-1-hch@lst.de> References: <20220713055317.1888500-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=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Just use the %pg format specifier instead. Signed-off-by: Christoph Hellwig --- block/blk-lib.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/block/blk-lib.c b/block/blk-lib.c index 09b7e1200c0f4..67e6dbc1ae817 100644 --- a/block/blk-lib.c +++ b/block/blk-lib.c @@ -48,10 +48,8 @@ int __blkdev_issue_discard(struct block_device *bdev, sector_t sector, /* In case the discard granularity isn't set by buggy device driver */ if (WARN_ON_ONCE(!bdev_discard_granularity(bdev))) { - char dev_name[BDEVNAME_SIZE]; - - bdevname(bdev, dev_name); - pr_err_ratelimited("%s: Error: discard_granularity is 0.\n", dev_name); + pr_err_ratelimited("%pg: Error: discard_granularity is 0.\n", + bdev); return -EOPNOTSUPP; } -- 2.30.2