2023-07-07 14:39:04

by hexingwei001

[permalink] [raw]
Subject: [PATCH] soc: ti: smartreflex: void function return statements are not generally useful

void function omap_sr_shutdown return statements are not generally
useful,
so deleted the return in function omap_sr_shutdown().

Signed-off-by: Xingwei He <[email protected]>
---
drivers/soc/ti/smartreflex.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/ti/smartreflex.c b/drivers/soc/ti/smartreflex.c
index 62b2f1464e46..20abfb0b8f26 100644
--- a/drivers/soc/ti/smartreflex.c
+++ b/drivers/soc/ti/smartreflex.c
@@ -955,7 +955,7 @@ static void omap_sr_shutdown(struct platform_device
*pdev)
if (sr_info->autocomp_active)
sr_stop_vddautocomp(sr_info);

- return;
+
}

static const struct of_device_id omap_sr_match[] = {


2023-07-07 15:13:22

by Dan Carpenter

[permalink] [raw]
Subject: Re: [PATCH] soc: ti: smartreflex: void function return statements are not generally useful

No need to CC [email protected]. Use
scripts/get_maintainer.pl to find the appropriate lists.

Your From header doesn't have your name, just your email address.

The subject is too long. Change it to:

[PATCH] soc: ti: smartreflex: Remove unnecessary return statement

The patch is corrupted. Take a look at
Documentation/process/email-clients.rst. Send an email to yourself
first to verify it applies.
> diff --git a/drivers/soc/ti/smartreflex.c b/drivers/soc/ti/smartreflex.c
> index 62b2f1464e46..20abfb0b8f26 100644
> --- a/drivers/soc/ti/smartreflex.c
> +++ b/drivers/soc/ti/smartreflex.c
> @@ -955,7 +955,7 @@ static void omap_sr_shutdown(struct platform_device
> *pdev)
> if (sr_info->autocomp_active)
> sr_stop_vddautocomp(sr_info);
>
> - return;
> +

This introduces two blank lines in a row which is a style violation. In
fact, there should be no blank lines before the last } closing brace in
a function so delete the other blank line as well.

> }

regards,
dan carpenter