From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9AF90C43387 for ; Fri, 18 Jan 2019 16:02:01 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6AB012086D for ; Fri, 18 Jan 2019 16:02:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="umUcTr1K" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6AB012086D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=inzLQQgaWCdfNNVKeWAGleaLtDxnNgMYwOq7ghP5gio=; b=umUcTr1K/litaJSHS9SabNnl0d KjHIvPvrpgX+J7Pd4S2FboRkdPmCeTrXAchkt18QZcSLh6Uaj6UO+NgWdzjfkTHWA9nnSe5mVcOPl CAWhorszrLyu9nyAO9IV1f75QOQpIyxfEUsA2iHOHDG+M7/5hHBJdfNh75hW61Dw/qqiZVzQpyxUs vdWEHRl7KMPBA9P1pT7gBcYsoZPrQfDhaqStdi0k4rQITQP838/k1AeZFSDQUUIXY3wuGderztPTE b5vcM4O7dku18iS/vtBM6uGc7E9v8S0ANc0fLE4PpssBLjMZXpkMA7kPMm2gLjfm+yWNBejaDmAt/ WfGzFCmw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gkWab-0006qE-9j; Fri, 18 Jan 2019 16:01:49 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gkWZZ-0006Pu-54 for linux-arm-kernel@lists.infradead.org; Fri, 18 Jan 2019 16:00:46 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C4FBEEBD; Fri, 18 Jan 2019 08:00:44 -0800 (PST) Received: from e119886-lin.cambridge.arm.com (unknown [10.37.6.11]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6766A3F557; Fri, 18 Jan 2019 08:00:42 -0800 (PST) From: Andrew Murray To: Masahiro Yamada , Arnd Bergmann , Kees Cook , Andrew Morton Subject: [PATCH 2/3] cpufreq: update headers to use STUB_UNLESS macro Date: Fri, 18 Jan 2019 16:00:29 +0000 Message-Id: <1547827230-55132-3-git-send-email-andrew.murray@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1547827230-55132-1-git-send-email-andrew.murray@arm.com> References: <1547827230-55132-1-git-send-email-andrew.murray@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190118_080045_195888_49AC22D2 X-CRM114-Status: GOOD ( 10.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: rjw@rjwysocki.net, Catalin Marinas , Will Deacon , linux-kernel@vger.kernel.org, Steven Price , Grant Likely , Dave P Martin , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use the STUB_UNLESS macro to simplify function declaration. Signed-off-by: Andrew Murray --- include/linux/cpufreq.h | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index c86d6d8..2c53cae 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -159,21 +159,12 @@ struct cpufreq_policy { #define CPUFREQ_SHARED_TYPE_ALL (2) /* All dependent CPUs should set freq */ #define CPUFREQ_SHARED_TYPE_ANY (3) /* Freq can be set from any dependent CPU*/ -#ifdef CONFIG_CPU_FREQ -struct cpufreq_policy *cpufreq_cpu_get_raw(unsigned int cpu); -struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu); -void cpufreq_cpu_put(struct cpufreq_policy *policy); -#else -static inline struct cpufreq_policy *cpufreq_cpu_get_raw(unsigned int cpu) -{ - return NULL; -} -static inline struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu) -{ - return NULL; -} -static inline void cpufreq_cpu_put(struct cpufreq_policy *policy) { } -#endif +STUB_UNLESS(CONFIG_CPU_FREQ, return NULL, +struct cpufreq_policy *cpufreq_cpu_get_raw(unsigned int cpu)); +STUB_UNLESS(CONFIG_CPU_FREQ, return NULL, +struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu)); +STUB_UNLESS(CONFIG_CPU_FREQ, +void cpufreq_cpu_put(struct cpufreq_policy *policy)); static inline bool policy_is_shared(struct cpufreq_policy *policy) { -- 2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel