Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3326735imu; Fri, 18 Jan 2019 08:30:51 -0800 (PST) X-Google-Smtp-Source: ALg8bN6Y8e8aojLx5Ah5ZjWn/0/vGvBzLmreE79Du66vuoGjmbz/IqPOWGqo1Tp+IcA/kQUWDypW X-Received: by 2002:aa7:8802:: with SMTP id c2mr19942140pfo.20.1547829051473; Fri, 18 Jan 2019 08:30:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547829051; cv=none; d=google.com; s=arc-20160816; b=p+7hsdIJmGi1CWNS7KUBJfrq4D4x9rVR83QHDmRma2TE9/J3xuaobYy4NQ6AqjxOBg bUgEVFgW5J9W+dK4ogeBzbGH5o4b3VpD51103kN1h4TBApTkm2s2xD//v+vPU1fVvEx9 Kd5mMi7C7ewuieTIuZmU3/Usb/JjD365jKlxR57z9/fwXAsoOoKj/dlUqcuCL1z+jggF 4R87ln3BXCCt+sGwq1jmYKXYAIkTetMkJ6PpRe0RxbdwChtS0Y3Msx43Dad39sKvVgVZ FKGc5sh9Z2Wnwhnh1VTGY6i+UKiFnOBhhWDrkD8xqxtbhDJ/3HLvbAV7c3cZsp7ihyVM NQbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=Jj/pP7pPOiTXADtP470inKsRbiTHzJ1MhjL5LAPaX38=; b=MI1zVQTW8F9ws/Dzh9AJ5COpm/nVi/xLwOQedgW6mqiteml2zYISKZw6R64voy16es 4k/7kmvH36W3labWDanSCzXOLNLypkZPbzo4+7Eqsy5fq2H7h6thv5EH0/VH73RdS9nR BPPZjGPiV/Ewon/vf0vZunBYNc4H/PYxb73TZDfEwRHSAigFcpn3ON/L1+e3FIV+Ej3c hX/oEjMDwGZn9AY9xW8BzfuuyY2A4VvTK/R0NY1czxlNcnmX0j2Gc7C+mk2GZu5Jfm7p ET+7pAR8Qz1jn3O3q4FvXbgcRErxxB3/ZzCEIhipOTydcI2DJpd/ge/9vk7yyvACrFp+ A8TQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h5si3119049pgc.237.2019.01.18.08.30.35; Fri, 18 Jan 2019 08:30:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728246AbfARQ3b (ORCPT + 99 others); Fri, 18 Jan 2019 11:29:31 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:33450 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727568AbfARQ3b (ORCPT ); Fri, 18 Jan 2019 11:29:31 -0500 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 E93351596; Fri, 18 Jan 2019 08:29:30 -0800 (PST) Received: from [10.1.196.69] (e112269-lin.cambridge.arm.com [10.1.196.69]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id F2C8A3F557; Fri, 18 Jan 2019 08:29:28 -0800 (PST) Subject: Re: [PATCH 2/3] cpufreq: update headers to use STUB_UNLESS macro To: Andrew Murray , Masahiro Yamada , Arnd Bergmann , Kees Cook , Andrew Morton Cc: rjw@rjwysocki.net, Catalin Marinas , Will Deacon , linux-kernel@vger.kernel.org, Grant Likely , Dave P Martin , linux-arm-kernel@lists.infradead.org References: <1547827230-55132-1-git-send-email-andrew.murray@arm.com> <1547827230-55132-3-git-send-email-andrew.murray@arm.com> From: Steven Price Message-ID: <47ed4a94-9221-00b1-b35e-a1f17b421a28@arm.com> Date: Fri, 18 Jan 2019 16:29:27 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <1547827230-55132-3-git-send-email-andrew.murray@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18/01/2019 16:00, Andrew Murray wrote: > 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) > { >