* [PATCH 2/2] regulator: dbx500: add missing header dependencies
@ 2016-09-23 12:50 Baoyou Xie
2016-09-23 13:45 ` Arnd Bergmann
0 siblings, 1 reply; 2+ messages in thread
From: Baoyou Xie @ 2016-09-23 12:50 UTC (permalink / raw)
To: lgirdwood, broonie; +Cc: linux-kernel, arnd, baoyou.xie, xie.baoyou
We get 1 warning when building kernel with W=1:
drivers/regulator/dbx500-prcmu.c:158:27: warning: no previous prototype for 'dbx500_regulator_testcase' [-Wmissing-prototypes]
In fact, this function is not declared in any file, but should be
declared in a header file. thus can be recognized in other file.
So this patch adds the declaration into
drivers/regulator/dbx500-prcmu.h.
Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
---
drivers/regulator/dbx500-prcmu.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/regulator/dbx500-prcmu.h b/drivers/regulator/dbx500-prcmu.h
index c8e51ac..644cb9e 100644
--- a/drivers/regulator/dbx500-prcmu.h
+++ b/drivers/regulator/dbx500-prcmu.h
@@ -35,7 +35,8 @@ struct dbx500_regulator_info {
void power_state_active_enable(void);
int power_state_active_disable(void);
-
+int dbx500_regulator_testcase(struct dbx500_regulator_info *regulator_info,
+ int num_regulators);
#ifdef CONFIG_REGULATOR_DEBUG
int ux500_regulator_debug_init(struct platform_device *pdev,
--
2.7.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 2/2] regulator: dbx500: add missing header dependencies
2016-09-23 12:50 [PATCH 2/2] regulator: dbx500: add missing header dependencies Baoyou Xie
@ 2016-09-23 13:45 ` Arnd Bergmann
0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2016-09-23 13:45 UTC (permalink / raw)
To: Baoyou Xie; +Cc: lgirdwood, broonie, linux-kernel, xie.baoyou
On Friday, September 23, 2016 8:50:10 PM CEST Baoyou Xie wrote:
> We get 1 warning when building kernel with W=1:
> drivers/regulator/dbx500-prcmu.c:158:27: warning: no previous prototype for 'dbx500_regulator_testcase' [-Wmissing-prototypes]
>
> In fact, this function is not declared in any file, but should be
> declared in a header file. thus can be recognized in other file.
>
> So this patch adds the declaration into
> drivers/regulator/dbx500-prcmu.h.
>
> Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
>
I'm always suspicious of a patch that only adds a declaration,
as that tends to mean that no other caller ever existed. In this
case, there is an empty "__weak" function definition and it
is called from the driver itself, but there is no other non-weak
definition. If there was another definition, it would probably
be wrong, so I'd just remove the function completely and not
call it.
Arnd
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-23 13:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-23 12:50 [PATCH 2/2] regulator: dbx500: add missing header dependencies Baoyou Xie
2016-09-23 13:45 ` Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®