diff mbox series

[RESEND,04/10] regulator: dbx500-prcmu: Remove unused function dbx500_regulator_testcase()

Message ID 20200625191708.4014533-5-lee.jones@linaro.org (mailing list archive)
State Mainlined
Commit d3cc3dfcc20e72d537550dbeebbe4a8faa7c2606
Headers show
Series Fix a bunch of W=1 warnings in Regulator | expand

Commit Message

Lee Jones June 25, 2020, 7:17 p.m. UTC
There isn't any code present within the current kernel to
override this 'weak' function.  Besides returning '0', which
is never checked anyway, the whole function appears to be
superfluous.

Consequently fixes W=1 warning:

 drivers/regulator/dbx500-prcmu.c:113:27: warning: no previous prototype for ‘dbx500_regulator_testcase’ [-Wmissing-prototypes]
 113 | int __attribute__((weak)) dbx500_regulator_testcase(
 | ^~~~~~~~~~~~~~~~~~~~~~~~~

Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/regulator/dbx500-prcmu.c | 8 --------
 1 file changed, 8 deletions(-)

Comments

Linus Walleij July 7, 2020, 12:41 p.m. UTC | #1
On Thu, Jun 25, 2020 at 9:17 PM Lee Jones <lee.jones@linaro.org> wrote:

> There isn't any code present within the current kernel to
> override this 'weak' function.  Besides returning '0', which
> is never checked anyway, the whole function appears to be
> superfluous.
>
> Consequently fixes W=1 warning:
>
>  drivers/regulator/dbx500-prcmu.c:113:27: warning: no previous prototype for ‘dbx500_regulator_testcase’ [-Wmissing-prototypes]
>  113 | int __attribute__((weak)) dbx500_regulator_testcase(
>  | ^~~~~~~~~~~~~~~~~~~~~~~~~
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/drivers/regulator/dbx500-prcmu.c b/drivers/regulator/dbx500-prcmu.c
index f604c8db6d0e9..c3ad6aa6b5d37 100644
--- a/drivers/regulator/dbx500-prcmu.c
+++ b/drivers/regulator/dbx500-prcmu.c
@@ -110,13 +110,6 @@  static int ux500_regulator_status_show(struct seq_file *s, void *p)
 }
 DEFINE_SHOW_ATTRIBUTE(ux500_regulator_status);
 
-int __attribute__((weak)) dbx500_regulator_testcase(
-	struct dbx500_regulator_info *regulator_info,
-	int num_regulators)
-{
-	return 0;
-}
-
 int
 ux500_regulator_debug_init(struct platform_device *pdev,
 	struct dbx500_regulator_info *regulator_info,
@@ -152,7 +145,6 @@  ux500_regulator_debug_init(struct platform_device *pdev,
 	if (!rdebug.state_after_suspend)
 		goto exit_free;
 
-	dbx500_regulator_testcase(regulator_info, num_regulators);
 	return 0;
 
 exit_free: