* [PATCH 1/2] mfd: ab8500-debugfs: add function declaration
@ 2016-09-24 5:34 Baoyou Xie
2016-09-24 8:30 ` Arnd Bergmann
2016-09-27 18:49 ` Lee Jones
0 siblings, 2 replies; 4+ messages in thread
From: Baoyou Xie @ 2016-09-24 5:34 UTC (permalink / raw)
To: lee.jones; +Cc: linux-kernel, arnd, baoyou.xie, xie.baoyou
We get 1 warning when building kernel with W=1:
drivers/mfd/ab8500-debugfs.c:1587:28: warning: no previous prototype for 'suspend_test_wake_cause_interrupt_is_mine' [-Wmissing-prototypes]
In fact, this function need be declared in a header files.
So this patch adds function declaration in
include/linux/mfd/abx500/ab8500.h.
Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
---
include/linux/mfd/abx500/ab8500.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h
index 9475fee..a496120 100644
--- a/include/linux/mfd/abx500/ab8500.h
+++ b/include/linux/mfd/abx500/ab8500.h
@@ -508,6 +508,7 @@ void ab8500_override_turn_on_stat(u8 mask, u8 set);
extern int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size);
void ab8500_dump_all_banks(struct device *dev);
void ab8500_debug_register_interrupt(int line);
+bool suspend_test_wake_cause_interrupt_is_mine(u32 my_int);
#else
static inline void ab8500_dump_all_banks(struct device *dev) {}
static inline void ab8500_debug_register_interrupt(int line) {}
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 1/2] mfd: ab8500-debugfs: add function declaration
2016-09-24 5:34 [PATCH 1/2] mfd: ab8500-debugfs: add function declaration Baoyou Xie
@ 2016-09-24 8:30 ` Arnd Bergmann
[not found] ` <CA+DQWkxQL0-3UFC7RTuBc2NQ1vwMScj9GLRwD62_yNg3pt1yNw@mail.gmail.com>
2016-09-27 18:49 ` Lee Jones
1 sibling, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2016-09-24 8:30 UTC (permalink / raw)
To: Baoyou Xie; +Cc: lee.jones, linux-kernel, xie.baoyou
On Saturday, September 24, 2016 1:34:50 PM CEST Baoyou Xie wrote:
> We get 1 warning when building kernel with W=1:
> drivers/mfd/ab8500-debugfs.c:1587:28: warning: no previous prototype for 'suspend_test_wake_cause_interrupt_is_mine' [-Wmissing-prototypes]
>
> In fact, this function need be declared in a header files.
>
> So this patch adds function declaration in
> include/linux/mfd/abx500/ab8500.h.
>
> Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
> ---
> include/linux/mfd/abx500/ab8500.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h
> index 9475fee..a496120 100644
> --- a/include/linux/mfd/abx500/ab8500.h
> +++ b/include/linux/mfd/abx500/ab8500.h
> @@ -508,6 +508,7 @@ void ab8500_override_turn_on_stat(u8 mask, u8 set);
> extern int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size);
> void ab8500_dump_all_banks(struct device *dev);
> void ab8500_debug_register_interrupt(int line);
> +bool suspend_test_wake_cause_interrupt_is_mine(u32 my_int);
> #else
> static inline void ab8500_dump_all_banks(struct device *dev) {}
> static inline void ab8500_debug_register_interrupt(int line) {}
>
This can't be right for two reasons:
- the suspend_test_wake_cause_interrupt_is_mine function again
is only used in the file it is defined in
- the name of the function does not have a prefix with the name of
the driver
I think the right fix is to make the function 'static inline'
and add a comment about the intent.
Arnd
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH 1/2] mfd: ab8500-debugfs: add function declaration
2016-09-24 5:34 [PATCH 1/2] mfd: ab8500-debugfs: add function declaration Baoyou Xie
2016-09-24 8:30 ` Arnd Bergmann
@ 2016-09-27 18:49 ` Lee Jones
1 sibling, 0 replies; 4+ messages in thread
From: Lee Jones @ 2016-09-27 18:49 UTC (permalink / raw)
To: Baoyou Xie; +Cc: linux-kernel, arnd, xie.baoyou
On Sat, 24 Sep 2016, Baoyou Xie wrote:
> We get 1 warning when building kernel with W=1:
> drivers/mfd/ab8500-debugfs.c:1587:28: warning: no previous prototype for 'suspend_test_wake_cause_interrupt_is_mine' [-Wmissing-prototypes]
>
> In fact, this function need be declared in a header files.
>
> So this patch adds function declaration in
> include/linux/mfd/abx500/ab8500.h.
>
> Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
> ---
> include/linux/mfd/abx500/ab8500.h | 1 +
> 1 file changed, 1 insertion(+)
I already fixed this: https://patchwork.kernel.org/patch/9333097/
> diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h
> index 9475fee..a496120 100644
> --- a/include/linux/mfd/abx500/ab8500.h
> +++ b/include/linux/mfd/abx500/ab8500.h
> @@ -508,6 +508,7 @@ void ab8500_override_turn_on_stat(u8 mask, u8 set);
> extern int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size);
> void ab8500_dump_all_banks(struct device *dev);
> void ab8500_debug_register_interrupt(int line);
> +bool suspend_test_wake_cause_interrupt_is_mine(u32 my_int);
> #else
> static inline void ab8500_dump_all_banks(struct device *dev) {}
> static inline void ab8500_debug_register_interrupt(int line) {}
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-09-27 18:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-24 5:34 [PATCH 1/2] mfd: ab8500-debugfs: add function declaration Baoyou Xie
2016-09-24 8:30 ` Arnd Bergmann
[not found] ` <CA+DQWkxQL0-3UFC7RTuBc2NQ1vwMScj9GLRwD62_yNg3pt1yNw@mail.gmail.com>
2016-09-25 23:29 ` Arnd Bergmann
2016-09-27 18:49 ` Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).