Skip to contentSkip to conversation

soc: ti: smartreflex: void function return statements are not generally useful

PATCH New [email protected] 2 participants 3 messages Jul 7, 2023 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 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().

---
 drivers/soc/ti/smartreflex.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/ti/smartreflex.c +1 -1
index 62b2f1464e46..20abfb0b8f26 100644
@@ -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[] = {
#2 lore raw

PATCH 1/1 soc: ti: smartreflex: void function return statements are not generally useful

In reply to a message not in the archive

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

---
 drivers/soc/ti/smartreflex.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/ti/smartreflex.c +1 -1
index 62b2f1464e46..20abfb0b8f26 100644
@@ -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[] = {
#3 lore raw

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.

drivers/soc/ti/smartreflex.c static void omap_sr_shutdown(struct platform_device · line 959

Quoted 11 lines
drivers/soc/ti/smartreflex.c +1 -1
index 62b2f1464e46..20abfb0b8f26 100644
@@ -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.

drivers/soc/ti/smartreflex.c static void omap_sr_shutdown(struct platform_device · line 960

Quoted 1 line
drivers/soc/ti/smartreflex.c +0 -0
 }

regards,
dan carpenter