Skip to contentSkip to conversation

staging: media: Remove unnecessary braces for single statement block

PATCH Superseded Gabriel Shahrouzi 2 participants 3 messages Apr 2, 2025 – Apr 7, 2025

Subsystems (4)

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 staging: media: Remove unnecessary braces for single statement block

Remove unnecessary braces in single statement block to comply with kernel coding style.

---

Changes in v2:
- Add missing author.
- Fix title of email.
Changes in v3:
- Resend using git send-email to fix formatting issues in email body.
Changes in v4:
- Use correct patch version.

---
 drivers/staging/media/imx/imx-media-of.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/media/imx/imx-media-of.c +1 -2
index bb28daa4d713..7413551052ae 100644
@@ -57,9 +57,8 @@ int imx_media_add_of_subdevs(struct imx_media_dev *imxmd,
 		of_node_put(csi_np);
 		if (ret) {
 			/* unavailable or already added is not an error */
-			if (ret == -ENODEV || ret == -EEXIST) {
+			if (ret == -ENODEV || ret == -EEXIST)
 				continue;
-			}
 
 			/* other error, can't continue */
 			return ret;
Signature · 1 line
2.43.0
#1 lore raw
Quoted 2 lines · Gabriel Shahrouzi

Remove unnecessary braces in single statement block to comply with kernel coding style.

Please add the driver in the subject line. So:

[PATCH v4] staging: media: imx: Remove unnecessary braces for single statement block

That way it is clear that this is a patch for a specific driver.

Regards,

Hans

Quoted 30 lines

---

Changes in v2:
- Add missing author.
- Fix title of email.
Changes in v3:
- Resend using git send-email to fix formatting issues in email body.
Changes in v4:
- Use correct patch version.

---
 drivers/staging/media/imx/imx-media-of.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/media/imx/imx-media-of.c +1 -2
index bb28daa4d713..7413551052ae 100644
@@ -57,9 +57,8 @@ int imx_media_add_of_subdevs(struct imx_media_dev *imxmd,
 		of_node_put(csi_np);
 		if (ret) {
 			/* unavailable or already added is not an error */
-			if (ret == -ENODEV || ret == -EEXIST) {
+			if (ret == -ENODEV || ret == -EEXIST)
 				continue;
-			}
 
 			/* other error, can't continue */
 			return ret;
#2 lore raw
Quoted 10 lines · Hans Verkuil
Quoted 2 lines · Gabriel Shahrouzi

Remove unnecessary braces in single statement block to comply with kernel coding style.

Please add the driver in the subject line. So:

[PATCH v4] staging: media: imx: Remove unnecessary braces for single statement block

That way it is clear that this is a patch for a specific driver.

Got it. Will send revision.

Quoted 36 lines

Regards,

Hans

Quoted 30 lines

---

Changes in v2:
- Add missing author.
- Fix title of email.
Changes in v3:
- Resend using git send-email to fix formatting issues in email body.
Changes in v4:
- Use correct patch version.

---
 drivers/staging/media/imx/imx-media-of.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/media/imx/imx-media-of.c +1 -2
index bb28daa4d713..7413551052ae 100644
@@ -57,9 +57,8 @@ int imx_media_add_of_subdevs(struct imx_media_dev *imxmd,
              of_node_put(csi_np);
              if (ret) {
                      /* unavailable or already added is not an error */
-                     if (ret == -ENODEV || ret == -EEXIST) {
+                     if (ret == -ENODEV || ret == -EEXIST)
                              continue;
-                     }
 
                      /* other error, can't continue */
                      return ret;