regulator: dbx500: add missing header dependencies
PATCH 2/2 regulator: dbx500: add missing header dependencies
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 intodrivers/regulator/dbx500-prcmu.h.
--- drivers/regulator/dbx500-prcmu.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/regulator/dbx500-prcmu.h +2 -1
@@ -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,
Signature · 1 line
2.7.4
Quoted 11 lines · CEST Baoyou Xie
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 <[email protected]>
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