From patchwork Fri Jan 18 16:00:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Murray X-Patchwork-Id: 10770759 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 954006C5 for ; Fri, 18 Jan 2019 16:01:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 81B562EA4C for ; Fri, 18 Jan 2019 16:01:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 75E722F319; Fri, 18 Jan 2019 16:01:53 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1259D2F318 for ; Fri, 18 Jan 2019 16:01:52 +0000 (UTC) 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 1gkWaa-0006qE-Kl; Fri, 18 Jan 2019 16:01:48 +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 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Use the STUB_UNLESS macro to simplify function declaration. Signed-off-by: Andrew Murray Reviewed-by: Steven Price --- 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) {