From patchwork Wed May 3 19:18:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Omar Sandoval X-Patchwork-Id: 9710309 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 0EBB66021C for ; Wed, 3 May 2017 19:19:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EDBA82865D for ; Wed, 3 May 2017 19:19:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E298728665; Wed, 3 May 2017 19:19:31 +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=-6.4 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 865F92865D for ; Wed, 3 May 2017 19:19:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756471AbdECTTa (ORCPT ); Wed, 3 May 2017 15:19:30 -0400 Received: from mail-pf0-f180.google.com ([209.85.192.180]:35041 "EHLO mail-pf0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755859AbdECTTP (ORCPT ); Wed, 3 May 2017 15:19:15 -0400 Received: by mail-pf0-f180.google.com with SMTP id v14so17047484pfd.2 for ; Wed, 03 May 2017 12:19:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osandov-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=VGceDjAHt4YFlWVtBVjM8SioGw0lVNrNJndLvXsUmNY=; b=XVHL15qq68KSbd/e/mtdPmRm8j39loupRmZairvDco2MxmBcRzouqWY27ruBd+GN4o ayKtzdu8W/zzP9vAKR+UQqgPRalB74YriE9IQPfo21clJNHYIz4ODF3ZKYCxYQWyK4Pq tVG1PMfJSi31qKv8JomA8rZ3XDs1QJwYv0ghak1mKzxhpZEE3jujWSdoadrMoMT2zQHD sCsPN/oiFCGvFsJOSaDIRwVOdCHKZRhGgVBQkDnqTbXEaYsTCTUKNntQXKOJ3M0DpN8y U0o9cvDh1FwJiadDaYclm4dFyY7zsFybx+gVCUm6ec8s2SZmTp10Ph2B0yNLWokIzOHM GyOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=VGceDjAHt4YFlWVtBVjM8SioGw0lVNrNJndLvXsUmNY=; b=cj8VMQ2POzi+h2WSl+097Sc3ww9ZVunAOjbz0H8kewD9ViWBnRNNTA9moOkfj9KjaI LdV0JmBJ71ihjUXueXuK7mcOnwCX9ZvmIpzVsj/KuVe+CnF98K+gUSL37X/GmjeXnhV5 SGbBTcYsPcG4NMzoCsYF4qpB0boiEB0/QzcxMctgKRwNQeppmLozmmXN0E5KECmaNiBp dR89p1NJuEWV2A866bkWAsSzyrc2Bg+lHUwSrQ1ofO06wDgyfoR5ZaeFJOQ4t/02Ukkw T/DfVbzDUBfReMiv49hSPDbuEZUr5TvN2ngXY/95IJf2lhMwDHXSd4qziEmhoamTp4qh lfuw== X-Gm-Message-State: AN3rC/7xKiHVbfBScRP89e/YhiabOCs3Tb7Iq+sx6IB1WxcI/FwwAt5i 6lCEv665HWTnXAUh X-Received: by 10.98.15.130 with SMTP id 2mr6395427pfp.207.1493839154602; Wed, 03 May 2017 12:19:14 -0700 (PDT) Received: from vader.thefacebook.com ([2620:10d:c090:180::1:5612]) by smtp.gmail.com with ESMTPSA id p6sm38216497pgn.9.2017.05.03.12.19.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 May 2017 12:19:14 -0700 (PDT) From: Omar Sandoval To: Jens Axboe , linux-block@vger.kernel.org Cc: Bart Van Assche , kernel-team@fb.com Subject: [PATCH 5/9] blk-mq: move debugfs declarations to a separate header file Date: Wed, 3 May 2017 12:18:58 -0700 Message-Id: <44a0e77e2a6eb82e144d24ea1029485316b429bf.1493839103.git.osandov@fb.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: References: In-Reply-To: References: 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 From: Omar Sandoval Preparation for adding more declarations. Signed-off-by: Omar Sandoval --- block/blk-core.c | 1 + block/blk-mq-debugfs.c | 1 + block/blk-mq-debugfs.h | 29 +++++++++++++++++++++++++++++ block/blk-mq-sysfs.c | 1 + block/blk-mq.h | 28 ---------------------------- block/blk-sysfs.c | 1 + 6 files changed, 33 insertions(+), 28 deletions(-) create mode 100644 block/blk-mq-debugfs.h diff --git a/block/blk-core.c b/block/blk-core.c index 24886b69690f..acdca6536562 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -40,6 +40,7 @@ #include "blk.h" #include "blk-mq.h" +#include "blk-mq-debugfs.h" #include "blk-mq-sched.h" #include "blk-wbt.h" diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c index 48b9f59acd91..6f98eb15e4f6 100644 --- a/block/blk-mq-debugfs.c +++ b/block/blk-mq-debugfs.c @@ -21,6 +21,7 @@ #include #include "blk.h" #include "blk-mq.h" +#include "blk-mq-debugfs.h" #include "blk-mq-tag.h" struct blk_mq_debugfs_attr { diff --git a/block/blk-mq-debugfs.h b/block/blk-mq-debugfs.h new file mode 100644 index 000000000000..00b0f71d0ae9 --- /dev/null +++ b/block/blk-mq-debugfs.h @@ -0,0 +1,29 @@ +#ifndef INT_BLK_MQ_DEBUGFS_H +#define INT_BLK_MQ_DEBUGFS_H + +#ifdef CONFIG_BLK_DEBUG_FS +int blk_mq_debugfs_register(struct request_queue *q); +void blk_mq_debugfs_unregister(struct request_queue *q); +int blk_mq_debugfs_register_mq(struct request_queue *q); +void blk_mq_debugfs_unregister_mq(struct request_queue *q); +#else +static inline int blk_mq_debugfs_register(struct request_queue *q) +{ + return 0; +} + +static inline void blk_mq_debugfs_unregister(struct request_queue *q) +{ +} + +static inline int blk_mq_debugfs_register_mq(struct request_queue *q) +{ + return 0; +} + +static inline void blk_mq_debugfs_unregister_mq(struct request_queue *q) +{ +} +#endif + +#endif diff --git a/block/blk-mq-sysfs.c b/block/blk-mq-sysfs.c index ec0afdf765e3..71a237a90d43 100644 --- a/block/blk-mq-sysfs.c +++ b/block/blk-mq-sysfs.c @@ -11,6 +11,7 @@ #include #include "blk-mq.h" +#include "blk-mq-debugfs.h" #include "blk-mq-tag.h" static void blk_mq_sysfs_release(struct kobject *kobj) diff --git a/block/blk-mq.h b/block/blk-mq.h index 2814a14e529c..cc67b48e3551 100644 --- a/block/blk-mq.h +++ b/block/blk-mq.h @@ -83,34 +83,6 @@ extern int blk_mq_sysfs_register(struct request_queue *q); extern void blk_mq_sysfs_unregister(struct request_queue *q); extern void blk_mq_hctx_kobj_init(struct blk_mq_hw_ctx *hctx); -/* - * debugfs helpers - */ -#ifdef CONFIG_BLK_DEBUG_FS -int blk_mq_debugfs_register(struct request_queue *q); -void blk_mq_debugfs_unregister(struct request_queue *q); -int blk_mq_debugfs_register_mq(struct request_queue *q); -void blk_mq_debugfs_unregister_mq(struct request_queue *q); -#else -static inline int blk_mq_debugfs_register(struct request_queue *q) -{ - return 0; -} - -static inline void blk_mq_debugfs_unregister(struct request_queue *q) -{ -} - -static inline int blk_mq_debugfs_register_mq(struct request_queue *q) -{ - return 0; -} - -static inline void blk_mq_debugfs_unregister_mq(struct request_queue *q) -{ -} -#endif - extern void blk_mq_rq_timed_out(struct request *req, bool reserved); void blk_mq_release(struct request_queue *q); diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index 3f37813ccbaf..9995355121d7 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c @@ -13,6 +13,7 @@ #include "blk.h" #include "blk-mq.h" +#include "blk-mq-debugfs.h" #include "blk-wbt.h" struct queue_sysfs_entry {