From: Vladimir Zapolskiy <vz@mleia.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] block: cfq-iosched: fix unused 'cpd_to_cfqgd' function warning
Date: Fri, 19 Jun 2015 01:33:13 +0300 [thread overview]
Message-ID: <1434666793-13339-1-git-send-email-vz@mleia.com> (raw)
If CFQ_GROUP_IOSCHED kernel option is not set, a compiler produces the
following warning:
CC block/cfq-iosched.o
linux/block/cfq-iosched.c:469:2:
warning: 'cpd_to_cfqgd' defined but not used [-Wunused-function]
*cpd_to_cfqgd(struct blkcg_policy_data *cpd)
^
Define this function only if CFQ_GROUP_IOSCHED is set and remove
the compilation warning.
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
---
block/cfq-iosched.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 64d59a5..9c294cd 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -465,11 +465,12 @@ static inline struct cfq_group *pd_to_cfqg(struct blkg_policy_data *pd)
return pd ? container_of(pd, struct cfq_group, pd) : NULL;
}
-static struct cfq_group_data
-*cpd_to_cfqgd(struct blkcg_policy_data *cpd)
+#ifdef CONFIG_CFQ_GROUP_IOSCHED
+static struct cfq_group_data *cpd_to_cfqgd(struct blkcg_policy_data *cpd)
{
return cpd ? container_of(cpd, struct cfq_group_data, pd) : NULL;
}
+#endif
static inline struct blkcg_gq *cfqg_to_blkg(struct cfq_group *cfqg)
{
--
2.1.4
next reply other threads:[~2015-06-18 22:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-18 22:33 Vladimir Zapolskiy [this message]
2015-06-19 16:15 ` 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=1434666793-13339-1-git-send-email-vz@mleia.com \
--to=vz@mleia.com \
--cc=axboe@kernel.dk \
--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®