From: Lee Jones <hidden> Date: 2020-07-14 14:51:40
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 <redacted>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <redacted>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Lee Jones <redacted>
---
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
@@ -15,21 +15,6 @@ extern void __init pasemi_map_registers(void);externvoididle_spin(void);externvoididle_doze(void);-/* Restore astate to last set */-#ifdef CONFIG_PPC_PASEMI_CPUFREQ-externintcheck_astate(void);-externvoidrestore_astate(intcpu);-#else-staticinlineintcheck_astate(void)-{-/* Always return >0 so we never power save */-return1;-}-staticinlinevoidrestore_astate(intcpu)-{-}-#endif-externstructpci_controller_opspasemi_pci_controller_ops;#endif /* _PASEMI_PASEMI_H */
@@ -0,0 +1,28 @@+/* SPDX-License-Identifier: GPL-2.0-only */+/*+*Copyright(C)2020LinaroLtd.+*+*Author:LeeJones<lee.jones@linaro.org>+*/++#ifndef _LINUX_PLATFORM_DATA_PASEMI_H+#define _LINUX_PLATFORM_DATA_PASEMI_H++/* Restore astate to last set */+#ifdef CONFIG_PPC_PASEMI_CPUFREQ+intcheck_astate(void);+voidrestore_astate(intcpu);+#else+staticinlineintcheck_astate(void)+{+/* Always return >0 so we never power save */+return1;+}+staticinlinevoidrestore_astate(intcpu)+{+}+#endif++#endif /* _LINUX_PLATFORM_DATA_PASEMI_H */++
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 <redacted>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <redacted>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Lee Jones <redacted>
---
arch/powerpc/platforms/pasemi/pasemi.h | 15 ------------
Is there no sane way we can include this file directly to the cpufreq
file ?
From: Olof Johansson <hidden> Date: 2020-07-15 03:27:04
On Tue, Jul 14, 2020 at 7:50 AM Lee Jones [off-list ref] wrote:
quoted hunk
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 <redacted>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <redacted>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Lee Jones <redacted>
---
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
@@ -15,21 +15,6 @@ extern void __init pasemi_map_registers(void);externvoididle_spin(void);externvoididle_doze(void);-/* Restore astate to last set */-#ifdef CONFIG_PPC_PASEMI_CPUFREQ-externintcheck_astate(void);-externvoidrestore_astate(intcpu);-#else-staticinlineintcheck_astate(void)-{-/* Always return >0 so we never power save */-return1;-}-staticinlinevoidrestore_astate(intcpu)-{-}-#endif-externstructpci_controller_opspasemi_pci_controller_ops;#endif /* _PASEMI_PASEMI_H */
From: Olof Johansson <hidden> Date: 2020-07-15 03:49:38
On Tue, Jul 14, 2020 at 8:07 PM Viresh Kumar [off-list ref] wrote:
On 14-07-20, 15:50, Lee Jones wrote:
quoted
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 <redacted>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <redacted>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Lee Jones <redacted>
---
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:
On Tue, Jul 14, 2020 at 8:07 PM Viresh Kumar [off-list ref] wrote:
quoted
On 14-07-20, 15:50, Lee Jones wrote:
quoted
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 <redacted>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <redacted>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Lee Jones <redacted>
---
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:
From: Lee Jones <hidden> Date: 2020-07-15 06:33:17
On Tue, 14 Jul 2020, Olof Johansson wrote:
On Tue, Jul 14, 2020 at 7:50 AM Lee Jones [off-list ref] wrote:
quoted
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 <redacted>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <redacted>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Lee Jones <redacted>
---
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
@@ -15,21 +15,6 @@ extern void __init pasemi_map_registers(void);externvoididle_spin(void);externvoididle_doze(void);-/* Restore astate to last set */-#ifdef CONFIG_PPC_PASEMI_CPUFREQ-externintcheck_astate(void);-externvoidrestore_astate(intcpu);-#else-staticinlineintcheck_astate(void)-{-/* Always return >0 so we never power save */-return1;-}-staticinlinevoidrestore_astate(intcpu)-{-}-#endif-externstructpci_controller_opspasemi_pci_controller_ops;#endif /* _PASEMI_PASEMI_H */
Absolutely not. It's neither your copyright, nor your authorship.
The file was new. Anyway, the point is now moot.
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
From: Lee Jones <hidden> Date: 2020-07-15 06:36:14
On Tue, 14 Jul 2020, Olof Johansson wrote:
quoted hunk
On Tue, Jul 14, 2020 at 8:07 PM Viresh Kumar [off-list ref] wrote:
quoted
On 14-07-20, 15:50, Lee Jones wrote:
quoted
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 <redacted>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <redacted>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Lee Jones <redacted>
---
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:
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
From: Olof Johansson <hidden> Date: 2020-07-15 06:46:58
On Tue, Jul 14, 2020 at 11:33 PM Lee Jones [off-list ref] wrote:
On Tue, 14 Jul 2020, Olof Johansson wrote:
quoted
On Tue, Jul 14, 2020 at 7:50 AM Lee Jones [off-list ref] wrote:
quoted
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 <redacted>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <redacted>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Lee Jones <redacted>
---
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
@@ -15,21 +15,6 @@ extern void __init pasemi_map_registers(void);externvoididle_spin(void);externvoididle_doze(void);-/* Restore astate to last set */-#ifdef CONFIG_PPC_PASEMI_CPUFREQ-externintcheck_astate(void);-externvoidrestore_astate(intcpu);-#else-staticinlineintcheck_astate(void)-{-/* Always return >0 so we never power save */-return1;-}-staticinlinevoidrestore_astate(intcpu)-{-}-#endif-externstructpci_controller_opspasemi_pci_controller_ops;#endif /* _PASEMI_PASEMI_H */
Absolutely not. It's neither your copyright, nor your authorship.
The file was new. Anyway, the point is now moot.
The contents was copied and pasted from other material, not originally
produced by you.
I suggest you consult with Linaro lawyers on how to handle this if you
have to do something like it in the future.
-Olof
From: Lee Jones <hidden> Date: 2020-07-15 07:33:11
On Tue, 14 Jul 2020, Olof Johansson wrote:
On Tue, Jul 14, 2020 at 11:33 PM Lee Jones [off-list ref] wrote:
quoted
On Tue, 14 Jul 2020, Olof Johansson wrote:
quoted
On Tue, Jul 14, 2020 at 7:50 AM Lee Jones [off-list ref] wrote:
quoted
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 <redacted>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <redacted>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Lee Jones <redacted>
---
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
@@ -15,21 +15,6 @@ extern void __init pasemi_map_registers(void);externvoididle_spin(void);externvoididle_doze(void);-/* Restore astate to last set */-#ifdef CONFIG_PPC_PASEMI_CPUFREQ-externintcheck_astate(void);-externvoidrestore_astate(intcpu);-#else-staticinlineintcheck_astate(void)-{-/* Always return >0 so we never power save */-return1;-}-staticinlinevoidrestore_astate(intcpu)-{-}-#endif-externstructpci_controller_opspasemi_pci_controller_ops;#endif /* _PASEMI_PASEMI_H */
Absolutely not. It's neither your copyright, nor your authorship.
The file was new. Anyway, the point is now moot.
The contents was copied and pasted from other material, not originally
produced by you.
I suggest you consult with Linaro lawyers on how to handle this if you
have to do something like it in the future.
Very well. Thanks for the heads-up.
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog