Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752672AbbFRWdZ (ORCPT ); Thu, 18 Jun 2015 18:33:25 -0400 Received: from li271-223.members.linode.com ([178.79.152.223]:33364 "EHLO mail.mleia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751314AbbFRWdR (ORCPT ); Thu, 18 Jun 2015 18:33:17 -0400 From: Vladimir Zapolskiy To: Jens Axboe 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 Message-Id: <1434666793-13339-1-git-send-email-vz@mleia.com> X-Mailer: git-send-email 2.1.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-49551924 X-CRM114-CacheID: sfid-20150618_233644_323799_F421066E X-CRM114-Status: UNSURE ( 8.61 ) X-CRM114-Notice: Please train this message. Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1400 Lines: 44 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 --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/