From: Matthias Kaehlcke <mka@chromium.org>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
Douglas Anderson <dianders@chromium.org>,
Matthias Kaehlcke <mka@chromium.org>
Subject: [PATCH 2/3] cfq-iosched: Fix warning about unused dummy functions
Date: Fri, 26 May 2017 14:22:36 -0700 [thread overview]
Message-ID: <20170526212237.103525-3-mka@chromium.org> (raw)
In-Reply-To: <20170526212237.103525-1-mka@chromium.org>
Only define dummies for cfqg_stats_set_start_group_wait_time()
and cfqg_stats_end_empty_time() when CONFIG_CFQ_GROUP_IOSCHED=y. This
fixes the following warnings when building with clang:
block/cfq-iosched.c:589:20: error: unused function
'cfqg_stats_set_start_group_wait_time' [-Werror,-Wunused-function]
block/cfq-iosched.c:590:20: error: unused function
'cfqg_stats_end_empty_time' [-Werror,-Wunused-function]
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
block/cfq-iosched.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 36ab3645effc..b23c73db4cc0 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -588,8 +588,10 @@ static void cfqg_stats_update_avg_queue_size(struct cfq_group *cfqg)
#else /* CONFIG_CFQ_GROUP_IOSCHED && CONFIG_DEBUG_BLK_CGROUP */
+#ifdef CONFIG_CFQ_GROUP_IOSCHED
static inline void cfqg_stats_set_start_group_wait_time(struct cfq_group *cfqg, struct cfq_group *curr_cfqg) { }
static inline void cfqg_stats_end_empty_time(struct cfqg_stats *stats) { }
+#endif
static inline void cfqg_stats_update_dequeue(struct cfq_group *cfqg) { }
static inline void cfqg_stats_set_start_empty_time(struct cfq_group *cfqg) { }
static inline void cfqg_stats_update_idle_time(struct cfq_group *cfqg) { }
--
2.13.0.219.gdb65acc882-goog
next prev parent reply other threads:[~2017-05-27 1:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-26 21:22 [PATCH 0/3] cfq-iosched: Fix warnings about unused functions Matthias Kaehlcke
2017-05-26 21:22 ` [PATCH 1/3] cfq-iosched: Mark cfq_clear_cfqq_*() as __maybe_unused Matthias Kaehlcke
2017-05-28 7:49 ` Christoph Hellwig
2017-05-30 16:28 ` Doug Anderson
2017-05-26 21:22 ` Matthias Kaehlcke [this message]
2017-05-26 21:22 ` [PATCH 3/3] cfq-iosched: Delete unused function min_vdisktime() Matthias Kaehlcke
2017-05-30 15:50 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170526212237.103525-3-mka@chromium.org \
--to=mka@chromium.org \
--cc=axboe@kernel.dk \
--cc=dianders@chromium.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®