From patchwork Tue Jul 14 14:50:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 235539 Delivered-To: patch@linaro.org Received: by 2002:a54:2c11:0:0:0:0:0 with SMTP id g17csp201503ecp; Tue, 14 Jul 2020 07:51:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEq5MUBCTBmXpz21LDfLijca9D3Fj2N8HpJTdyODCl7lw8lD+KZmGuLADuqrbA0bh7dhjK X-Received: by 2002:a17:906:1b45:: with SMTP id p5mr4792357ejg.51.1594738302161; Tue, 14 Jul 2020 07:51:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594738302; cv=none; d=google.com; s=arc-20160816; b=El3ydGNV+ItfN4xMI3HBuMEmdL+7iYJV3g8PDqTPbxHvPR7pLJuOblgVZQgnChsw19 N4fWw4NK2hgsI8bD3xzWbm77zslXTvfOoVTi6Gz75QYHITr5K52ldH6XvBcJCFXxEmz7 qxNcWXt42t+Gxh2wjzyCsA+buoJ6PtGzG3j4awJ+0mLmLkv1ccimVS4KXB6jeyn+eiXM 0ZKz+AjpR6CmjQYCBz+jQC7Bi3xtBJyfgijdr/pNjMGAYV37M49sDHe/9qHBBgqVUg5o 0/FWhW9s6+DZbW67Nql3p+Bji9Y4vregHHg+/B76wLOT5HO7xr0o3Cu1eUOh7n6H54rl 3Izw== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=sa7IFFvEjkUEYkKGNfZ4AaOfAhDNPotc0mtcZbr7pMU=; b=dgEUYqM616cbe1iCE/jyoOtOSdb+G+DQumBZY4OYxUywzGd73XdB97FDxSAW23jcKy qBRTVwafOiG7lQXn45QQdI0QvoVVheM1NTAEN9yZ9+KjkdmZ4R3kT6I4nJvc6uWSheRg FW92O2ar641iMadCDQLgU3NyHwsRr52C1ARiEV0JNjHEli6f94I/MzQnGSRlwsOao0oO 9iwWORabgZPbg8MBW4MFKjCyqOuZDvdbKWtGXm0iMi2OqJa1N9aQtnuELn7s8e3ibCKu 4oeqPvuwfj3d5+uxbzOCrXMotv8aPeRwLKzVHh+XS6a3k/YfdTd4DVDFb6wUGCcgUsyy +QFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Yr1SJcM2; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o17si11459902ejg.650.2020.07.14.07.51.41; Tue, 14 Jul 2020 07:51:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Yr1SJcM2; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729004AbgGNOvi (ORCPT + 10 others); Tue, 14 Jul 2020 10:51:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725803AbgGNOu7 (ORCPT ); Tue, 14 Jul 2020 10:50:59 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C93FEC061794 for ; Tue, 14 Jul 2020 07:50:58 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id f2so22124238wrp.7 for ; Tue, 14 Jul 2020 07:50:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sa7IFFvEjkUEYkKGNfZ4AaOfAhDNPotc0mtcZbr7pMU=; b=Yr1SJcM2AwK2hW8wKdiFtlaK6rKbZ3NlkGx8d1Od6cqVH4nDmmoGCDQVhLHIDws+3d 2OVvC3aJXzU/ZjRq+haMRmCsqS9W94aOftUL13uUTXk4ZnJIiwTbqrjSFcSQ6+MBToTA Wlf9HuAi0Aza+9dtw/LHZF7rOTCDvLKrgawrfm5e6w/OV2eflKYPT6fW2ypIM7ewVmNc 6sZcE8UtKJDkeu8wqVxcoXJajhBkeReoa/7FhnEB2BS2H5Z5vYRvhfarz4C2XXTsWwBv aBmWOuw/i4Vdi3oCKJV1Zdhv/857tPWI3NzjMDJuHyaPTGpybciaeB3NKBD0sTczkWGs so9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sa7IFFvEjkUEYkKGNfZ4AaOfAhDNPotc0mtcZbr7pMU=; b=GJsFrWmZ6PbblctWCTxBPQMrsLtb8KmwguZpEor+M3Bo8/54r1s8v+8MG+/H0WJ9VJ 2kXtM9EL5SF9dQIty4XcnZ/Hs9B/e0hXnZQAzja4fwP3AQSrf4BbT6UhPVlzYDZjh+Y6 ObcHToipJKFzg9NHusUv9qOvfoC7a0WH8rdP/rEfUkZVtP9mxLo5Lh8kJ6Qmqa1Z83xj lPgZicsZ7eSFV0Mn6yDHT8hsl0eUsVzKYNp+vmWSqvOkegk0gYa7gu1ppBQ4f8BwruoN aJCZwh0nDRLx0VRLG19r0tKX1SN3Efr+oxQRtXOZPpieFP/rw8jgf04UK9qwq/VAVbr0 s0zw== X-Gm-Message-State: AOAM530xILnVTjvUitBzJ3WOXJNwxkYRyv1ouZA6D9AsfBP0dpCPu8sJ I7eAsQ96P089SzLv69BoMGe16w== X-Received: by 2002:adf:82f5:: with SMTP id 108mr6084464wrc.218.1594738257584; Tue, 14 Jul 2020 07:50:57 -0700 (PDT) Received: from localhost.localdomain ([2.31.163.61]) by smtp.gmail.com with ESMTPSA id a84sm4653305wmh.47.2020.07.14.07.50.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 07:50:57 -0700 (PDT) From: Lee Jones To: rjw@rjwysocki.net, viresh.kumar@linaro.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Lee Jones , Olof Johansson , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , linuxppc-dev@lists.ozlabs.org Subject: [PATCH 05/13] cpufreq/arch: powerpc: pasemi: Move prototypes to shared header Date: Tue, 14 Jul 2020 15:50:41 +0100 Message-Id: <20200714145049.2496163-6-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200714145049.2496163-1-lee.jones@linaro.org> References: <20200714145049.2496163-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org If function callers and providers do not share the same prototypes the compiler complains of missing prototypes. Fix this by moving the already existing prototypes out to a mutually convenient location. Fixes the following W=1 kernel build warning(s): drivers/cpufreq/pasemi-cpufreq.c:109:5: warning: no previous prototype for ‘check_astate’ [-Wmissing-prototypes] 109 | int check_astate(void) | ^~~~~~~~~~~~ drivers/cpufreq/pasemi-cpufreq.c:114:6: warning: no previous prototype for ‘restore_astate’ [-Wmissing-prototypes] 114 | void restore_astate(int cpu) | ^~~~~~~~~~~~~~ Cc: Olof Johansson Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Lee Jones --- arch/powerpc/platforms/pasemi/pasemi.h | 15 ------------ arch/powerpc/platforms/pasemi/powersave.S | 2 ++ drivers/cpufreq/pasemi-cpufreq.c | 1 + include/linux/platform_data/pasemi.h | 28 +++++++++++++++++++++++ 4 files changed, 31 insertions(+), 15 deletions(-) create mode 100644 include/linux/platform_data/pasemi.h -- 2.25.1 diff --git a/arch/powerpc/platforms/pasemi/pasemi.h b/arch/powerpc/platforms/pasemi/pasemi.h index 70b56048ed1be..528d81ef748ad 100644 --- a/arch/powerpc/platforms/pasemi/pasemi.h +++ b/arch/powerpc/platforms/pasemi/pasemi.h @@ -15,21 +15,6 @@ extern void __init pasemi_map_registers(void); extern void idle_spin(void); extern void idle_doze(void); -/* Restore astate to last set */ -#ifdef CONFIG_PPC_PASEMI_CPUFREQ -extern int check_astate(void); -extern void restore_astate(int cpu); -#else -static inline int check_astate(void) -{ - /* Always return >0 so we never power save */ - return 1; -} -static inline void restore_astate(int cpu) -{ -} -#endif - extern struct pci_controller_ops pasemi_pci_controller_ops; #endif /* _PASEMI_PASEMI_H */ diff --git a/arch/powerpc/platforms/pasemi/powersave.S b/arch/powerpc/platforms/pasemi/powersave.S index d0215d5329ca7..7747b48963286 100644 --- a/arch/powerpc/platforms/pasemi/powersave.S +++ b/arch/powerpc/platforms/pasemi/powersave.S @@ -5,6 +5,8 @@ * Maintained by: Olof Johansson */ +#include + #include #include #include diff --git a/drivers/cpufreq/pasemi-cpufreq.c b/drivers/cpufreq/pasemi-cpufreq.c index c66f566a854cb..c6bb3ecc90ef3 100644 --- a/drivers/cpufreq/pasemi-cpufreq.c +++ b/drivers/cpufreq/pasemi-cpufreq.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include diff --git a/include/linux/platform_data/pasemi.h b/include/linux/platform_data/pasemi.h new file mode 100644 index 0000000000000..3fed0687fcc9a --- /dev/null +++ b/include/linux/platform_data/pasemi.h @@ -0,0 +1,28 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (C) 2020 Linaro Ltd. + * + * Author: Lee Jones + */ + +#ifndef _LINUX_PLATFORM_DATA_PASEMI_H +#define _LINUX_PLATFORM_DATA_PASEMI_H + +/* Restore astate to last set */ +#ifdef CONFIG_PPC_PASEMI_CPUFREQ +int check_astate(void); +void restore_astate(int cpu); +#else +static inline int check_astate(void) +{ + /* Always return >0 so we never power save */ + return 1; +} +static inline void restore_astate(int cpu) +{ +} +#endif + +#endif /* _LINUX_PLATFORM_DATA_PASEMI_H */ + +