Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp220695ybh; Tue, 14 Jul 2020 23:39:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxORltvV5M1nrUQ3nJF0CUxlauhVQnsus40czqFBv28Ky7AlLz1emQhfd6R/TfPXNY19QLM X-Received: by 2002:a17:906:23e9:: with SMTP id j9mr7749463ejg.107.1594795151950; Tue, 14 Jul 2020 23:39:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594795151; cv=none; d=google.com; s=arc-20160816; b=xeiCAJTnZFHcCn5fgyP+sxro7PXZPS7cjOzf6CB2EOdtD/6V4TcRYEKSBk8wA6/QPV 7sfecdi4TTFZM3TebYWKclbqUURA3wb00IjPyo1Pvt1Yiud1+qO318aI6WVVNm5w1m71 wQQjJuZUEh7EqL4OF4B4jAReVPYS45tG4b9bnMhukBTX1ZuAKG55iSL5t4FilAn6p0+D GwiM2gHfviMdXQfjk+F4L53VE4VIMllhhsC5V5/GIyi1F6fwstICf3H8g4034wWbN70o fILyE48k9QwP5Ekg9GqSKFfbG9otlc+gOUmC7oFhGcHgK2za/XLRV+gUr9Gkl/jdlxn5 LPYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=KDUw/p8DtJDnQnEVAJVG2yQivQjSwBAN+u3RJMI5C9M=; b=tEgJjuYYWSx8VdkJ4AIX9SlmMOguEfjX2kcKClmaYPfnc2JswH+wVW4In/fMroTsQP h6Or01x+pOMUhCd96ZS9Atsm2X50njLhXcL3u3afxxmco4YcfgPhAADX/MLhzIPJamCs Udf+jXi+les/AnQNUrmutACYD1RNzZ2Wd6tlNZMEPbPHF7+oP49RESAyaGkhzFwWx1mj oqkRRPmhqu3A3TqfaFdYc2feiAkpgoNPMEU24SiRt7wMSXgksCA1z93BpfzhtDid4poH +A7h8ghTJ+db6cTliOiHTjL6U95NkXaD1slBaGmySmZ0FLOQ2Ifiekuxeb2m0C4WEAVY diAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LSZT6nxj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 x18si795903ejd.265.2020.07.14.23.38.48; Tue, 14 Jul 2020 23:39:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=LSZT6nxj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S1728713AbgGOGgM (ORCPT + 99 others); Wed, 15 Jul 2020 02:36:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725823AbgGOGgL (ORCPT ); Wed, 15 Jul 2020 02:36:11 -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 2FD24C061755 for ; Tue, 14 Jul 2020 23:36:11 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id o11so1138351wrv.9 for ; Tue, 14 Jul 2020 23:36:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=KDUw/p8DtJDnQnEVAJVG2yQivQjSwBAN+u3RJMI5C9M=; b=LSZT6nxj4ttqP+kcl0xXx7k4ieooPzTPhig26hkGekfVkTtaH2JHD7+dmxhRfBfbm9 uKPMX+hERxM6t42+4N6Xh0vvgnPAfsFn5um87k5Hky68u56FiBTANQ6c0XV9/ywqemtP CFHDRfgAs54jtev5fUuTHNM4XmDz+cyusdsqI8vFKQQipJSfmX8Cm9q8GsL8E/P6QhKi OlSqCFgn7c90mzyzrNpJBBX6xzzYbAhAWwoD8Q4p4gH4v4H0l4HxkwqNA2okUfvvEvek kJEW5+lu08HFJmq/k1o7p4bwNczt54wfoHeMEZaxoZ3WcW7Kt+Irk30DRPMp9W+2+k01 vKvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=KDUw/p8DtJDnQnEVAJVG2yQivQjSwBAN+u3RJMI5C9M=; b=jT3agJN2Sat7XXwvOt21G81CQ6rfoNbp2e4JDqfcwoXydzBfsXKjJwIRIP1lDMgnbV +uzHXpSCThZ6Dmw5/zXjo9ase2mi/xZbB6RGAQ2EyAIuILpCksKitGwnFwg8coxO8hP0 DbwV1eR0mpJQiBrxOfZIFgik23tea+2pl+koM9XuMUwUzRN7unMNzfdrHn3fEQJCAUIs Qb8WsVVWYhYFOPZSyAzWa9//eLpPzpyF4qFkm/ufaDUjOTE0o6X0Cv7lX4JdA5D5ey5N CTJKZUG8toBI6uNN9xo+K4ZkqovHZcHlsKQPbaHjJ033xd3X163K2Nsl6yO0OkbcX87l Q6kw== X-Gm-Message-State: AOAM531D+NBWBLago2f3bIYCYdRpnui+C7gW/IIwBt7YwEVM6tkLxD3p NjWeTHbMAjT0v5Rceq/vZX8ZDQ== X-Received: by 2002:a5d:470b:: with SMTP id y11mr10046135wrq.101.1594794969893; Tue, 14 Jul 2020 23:36:09 -0700 (PDT) Received: from dell ([2.31.163.61]) by smtp.gmail.com with ESMTPSA id k126sm2040627wmf.3.2020.07.14.23.36.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 23:36:09 -0700 (PDT) Date: Wed, 15 Jul 2020 07:36:07 +0100 From: Lee Jones To: Olof Johansson Cc: Viresh Kumar , "Rafael J. Wysocki" , Linux ARM Mailing List , Linux Kernel Mailing List , linux-pm@vger.kernel.org, Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , linuxppc-dev Subject: Re: [PATCH 05/13] cpufreq/arch: powerpc: pasemi: Move prototypes to shared header Message-ID: <20200715063607.GQ1398296@dell> References: <20200714145049.2496163-1-lee.jones@linaro.org> <20200714145049.2496163-6-lee.jones@linaro.org> <20200715030706.prxya7fyylscoy25@vireshk-i7> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 14 Jul 2020, Olof Johansson wrote: > On Tue, Jul 14, 2020 at 8:07 PM Viresh Kumar wrote: > > > > On 14-07-20, 15:50, Lee Jones wrote: > > > 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 ------------ > > > > Is there no sane way we can include this file directly to the cpufreq > > file ? > > Yep. arch/powerpc seems to be in the search path for modules on powerpc, so: > > diff --git a/drivers/cpufreq/pasemi-cpufreq.c b/drivers/cpufreq/pasemi-cpufreq.c > index c66f566a854cb..815645170c4de 100644 > --- a/drivers/cpufreq/pasemi-cpufreq.c > +++ b/drivers/cpufreq/pasemi-cpufreq.c > @@ -22,6 +22,8 @@ > #include > #include > > +#include > + > #define SDCASR_REG 0x0100 > #define SDCASR_REG_STRIDE 0x1000 > #define SDCPWR_CFGA0_REG 0x0100 I searched for "include.*platforms/" in drivers/, and was scared off this method since no one else does this. But if it's a reasonable solution, great. Will fix. Thanks Olof. -- Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog