From: Lee Jones <lee.jones@linaro•org>
To: Olof Johansson <olof@lixom•net>
Cc: linux-pm@vger•kernel.org, "Rafael J. Wysocki" <rjw@rjwysocki•net>,
Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
Paul Mackerras <paulus@samba•org>,
Viresh Kumar <viresh.kumar@linaro•org>,
linuxppc-dev <linuxppc-dev@lists•ozlabs.org>,
Linux ARM Mailing List <linux-arm-kernel@lists•infradead.org>
Subject: Re: [PATCH 05/13] cpufreq/arch: powerpc: pasemi: Move prototypes to shared header
Date: Wed, 15 Jul 2020 07:36:07 +0100 [thread overview]
Message-ID: <20200715063607.GQ1398296@dell> (raw)
In-Reply-To: <CAOesGMi1dfqPbFJ8YoUoJ75NdU1=XiNoYx+6+JLu44a4LuuYGA@mail.gmail.com>
On Tue, 14 Jul 2020, Olof Johansson wrote:
> On Tue, Jul 14, 2020 at 8:07 PM Viresh Kumar <viresh.kumar@linaro•org> 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 <olof@lixom•net>
> > > Cc: Michael Ellerman <mpe@ellerman•id.au>
> > > Cc: Benjamin Herrenschmidt <benh@kernel•crashing.org>
> > > Cc: Paul Mackerras <paulus@samba•org>
> > > Cc: linuxppc-dev@lists•ozlabs.org
> > > Signed-off-by: Lee Jones <lee.jones@linaro•org>
> > > ---
> > > 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 <asm/time.h>
> #include <asm/smp.h>
>
> +#include <platforms/pasemi/pasemi.h>
> +
> #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
next prev parent reply other threads:[~2020-07-15 6:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200714145049.2496163-1-lee.jones@linaro.org>
2020-07-14 14:50 ` [PATCH 05/13] cpufreq/arch: powerpc: pasemi: Move prototypes to shared header Lee Jones
2020-07-15 3:07 ` Viresh Kumar
2020-07-15 3:49 ` Olof Johansson
2020-07-15 3:51 ` Viresh Kumar
2020-07-15 6:36 ` Lee Jones [this message]
2020-07-15 6:39 ` Viresh Kumar
2020-07-15 3:26 ` Olof Johansson
2020-07-15 6:33 ` Lee Jones
2020-07-15 6:46 ` Olof Johansson
2020-07-15 7:33 ` Lee Jones
2020-07-14 14:50 ` [PATCH 06/13] cpufreq: powernv-cpufreq: Functions only used in call-backs should be static Lee Jones
2020-07-15 3:07 ` Viresh Kumar
2020-07-14 14:50 ` [PATCH 07/13] cpufreq: powernv-cpufreq: Fix a bunch of kerneldoc related issues Lee Jones
2020-07-15 3:09 ` Viresh Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200715063607.GQ1398296@dell \
--to=lee.jones@linaro$(echo .)org \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-pm@vger$(echo .)kernel.org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=olof@lixom$(echo .)net \
--cc=paulus@samba$(echo .)org \
--cc=rjw@rjwysocki$(echo .)net \
--cc=viresh.kumar@linaro$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox