From patchwork Fri Jun 15 21:55:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10467729 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 972F1600F4 for ; Fri, 15 Jun 2018 21:55:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 85B9B28E63 for ; Fri, 15 Jun 2018 21:55:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7A71628E67; Fri, 15 Jun 2018 21:55:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1CE1028EA3 for ; Fri, 15 Jun 2018 21:55:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756434AbeFOVzY (ORCPT ); Fri, 15 Jun 2018 17:55:24 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:55080 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756598AbeFOVzX (ORCPT ); Fri, 15 Jun 2018 17:55:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1529099724; x=1560635724; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=oRQzETXCQCp1lz447TeEvJD65qgLzQuAT8VK9cG1W50=; b=Hlwio4ScL68hrr+y+v/elYUkOU6ZPXz4feSemOH13wh/47KYDYwHvRyS JkfaPYbNJQxPf9ZG6fZ9CN5IITyh896Y3hx8DS36e66moH6GmU49ZImrf +eKgUB3twEuMNQClxiTFAsffGUfsVop16+Lgb32JSkgd55Lte6EbNlsi9 Bro+rLU01aa2TlOEH04TeuUdQB3G1mnPtVW7r0JH8/0+k7FnLnixgqMwC 6YMcFCuZgD0xy0sllJwRc6DEVDaGKBLvRJ4Ywh6z6SPk9pKHpBRJ3qbqA GeSCr5terFPBnTZ2svETdY/wOQqZiKZcRYFzIDLOHNKgQ3xWTXyB8PcQg g==; X-IronPort-AV: E=Sophos;i="5.51,228,1526313600"; d="scan'208";a="80546946" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 16 Jun 2018 05:55:23 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP; 15 Jun 2018 14:45:31 -0700 Received: from thinkpad-bart.sdcorp.global.sandisk.com ([10.111.67.248]) by uls-op-cesaip01.wdc.com with ESMTP; 15 Jun 2018 14:55:23 -0700 From: Bart Van Assche To: Jens Axboe Cc: linux-block@vger.kernel.org, Christoph Hellwig , Bart Van Assche , Matias Bjorling Subject: [PATCH 4/5] block: Inline blk_queue_nr_zones() Date: Fri, 15 Jun 2018 14:55:20 -0700 Message-Id: <20180615215521.27435-5-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180615215521.27435-1-bart.vanassche@wdc.com> References: <20180615215521.27435-1-bart.vanassche@wdc.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since the implementation of blk_queue_nr_zones() is trivial and since it only has a single caller, inline this function. Signed-off-by: Bart Van Assche Reviewed-by: Damien Le Moal Cc: Matias Bjorling Cc: Christoph Hellwig --- block/blk-mq-debugfs.c | 2 +- include/linux/blkdev.h | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c index 67aa2d4e2e89..b92ef4c3038e 100644 --- a/block/blk-mq-debugfs.c +++ b/block/blk-mq-debugfs.c @@ -214,7 +214,7 @@ static int queue_zone_wlock_show(void *data, struct seq_file *m) if (!q->seq_zones_wlock) return 0; - for (i = 0; i < blk_queue_nr_zones(q); i++) + for (i = 0; i < q->nr_zones; i++) if (test_bit(i, q->seq_zones_wlock)) seq_printf(m, "%u\n", i); diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 05cd0c8e5735..96640bcd5e78 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -800,11 +800,6 @@ static inline unsigned int blk_queue_zone_sectors(struct request_queue *q) return blk_queue_is_zoned(q) ? q->limits.chunk_sectors : 0; } -static inline unsigned int blk_queue_nr_zones(struct request_queue *q) -{ - return q->nr_zones; -} - static inline unsigned int blk_queue_zone_no(struct request_queue *q, sector_t sector) {