Skip to contentSkip to conversation

Staging : media : atomisp : pci : fixed a brace coding sytle issue

PATCH In review Ankit 3 participants 12 messages Jul 27, 2020 – Jul 29, 2020

Subsystems (4)
lore
Share & tools
lore

Ankit

author
#0 lore raw

PATCH 1/1 Staging : media : atomisp : pci : fixed a brace coding sytle issue

From: Ankit Baluni<[email protected]>

Fixed a coding style issue.

---
 drivers/staging/media/atomisp/pci/atomisp_cmd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/media/atomisp/pci/atomisp_cmd.c +1 -2
index 8ea65bef35d2..28b96b66f4f3 100644
@@ -4981,9 +4981,8 @@ enum mipi_port_id __get_mipi_port(struct atomisp_device *isp,
 	case ATOMISP_CAMERA_PORT_SECONDARY:
 		return MIPI_PORT1_ID;
 	case ATOMISP_CAMERA_PORT_TERTIARY:
-		if (MIPI_PORT1_ID + 1 != N_MIPI_PORT_ID) {
+		if (MIPI_PORT1_ID + 1 != N_MIPI_PORT_ID)
 			return MIPI_PORT1_ID + 1;
-		}
 	/* fall through */
 	default:
 		dev_err(isp->dev, "unsupported port: %d\n", port);
Signature · 1 line
2.25.1
#1 lore raw
Quoted 3 lines · Ankit

From: Ankit Baluni<[email protected]>

Fixed a coding style issue.

One time is enough to be sent :-)

The Subject nevertheless can be amended, like

media: atomisp: fixed a brace coding sytle issue

Signature · 2 lines
With Best Regards,
Andy Shevchenko
author
#2 lore raw

PATCH 1/1 Staging : media : atomisp : fixed a brace coding sytle issue

From: Ankit Baluni<[email protected]>

Fixed a coding style issue.

---
 drivers/staging/media/atomisp/pci/atomisp_cmd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/media/atomisp/pci/atomisp_cmd.c +1 -2
index 8ea65bef35d2..28b96b66f4f3 100644
@@ -4981,9 +4981,8 @@ enum mipi_port_id __get_mipi_port(struct atomisp_device *isp,
 	case ATOMISP_CAMERA_PORT_SECONDARY:
 		return MIPI_PORT1_ID;
 	case ATOMISP_CAMERA_PORT_TERTIARY:
-		if (MIPI_PORT1_ID + 1 != N_MIPI_PORT_ID) {
+		if (MIPI_PORT1_ID + 1 != N_MIPI_PORT_ID)
 			return MIPI_PORT1_ID + 1;
-		}
 	/* fall through */
 	default:
 		dev_err(isp->dev, "unsupported port: %d\n", port);
Signature · 1 line
2.25.1
maintainer
#3 lore raw

Re: [PATCH] Staging : media : atomisp : fixed a brace coding sytle issue

Quoted 1 line · Ankit

From: Ankit Baluni<[email protected]>

You need a ' ' before the '<' character.

Quoted 2 lines

Fixed a coding style issue.

Be more descriptive of what you are doing, this is vague.

Quoted 2 lines

Same here with the ' '.

thanks,

greg k-h

author
#4 lore raw

PATCH v2 1/1 Staging : media : atomisp : fixed a brace coding sytle issue

From: Ankit Baluni <[email protected]>

Removed braces for a 'if' condition as it contain only single line & there is no need for braces for such case according to coding style rules.

---
 drivers/staging/media/atomisp/pci/atomisp_cmd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/media/atomisp/pci/atomisp_cmd.c +1 -2
index 8ea65bef35d2..28b96b66f4f3 100644
@@ -4981,9 +4981,8 @@ enum mipi_port_id __get_mipi_port(struct atomisp_device *isp,
 	case ATOMISP_CAMERA_PORT_SECONDARY:
 		return MIPI_PORT1_ID;
 	case ATOMISP_CAMERA_PORT_TERTIARY:
-		if (MIPI_PORT1_ID + 1 != N_MIPI_PORT_ID) {
+		if (MIPI_PORT1_ID + 1 != N_MIPI_PORT_ID)
 			return MIPI_PORT1_ID + 1;
-		}
 	/* fall through */
 	default:
 		dev_err(isp->dev, "unsupported port: %d\n", port);
Signature · 1 line
2.25.1
maintainer
#5 lore raw

Re: [PATCH v2] Staging : media : atomisp : fixed a brace coding sytle issue

Quoted 11 lines · Ankit

From: Ankit Baluni <[email protected]>

Removed braces for a 'if' condition as it contain only single line & there is no need for braces for such case according to coding style rules.

---
 drivers/staging/media/atomisp/pci/atomisp_cmd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

What changed from v1?

Always put that below the --- line as the documentation asks for.

thanks,

greg k-h

author
#6 lore raw

PATCH v2 1/1 Staging : media : atomisp : fixed a brace coding sytle issue

From: Ankit Baluni <[email protected]>

Removed braces for a 'if' condition as it contain only single line & there is no need for braces for such case according to coding style rules.

---
Added extra description and added space before '<' in above lines.

 drivers/staging/media/atomisp/pci/atomisp_cmd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/media/atomisp/pci/atomisp_cmd.c +1 -2
index 8ea65bef35d2..28b96b66f4f3 100644
@@ -4981,9 +4981,8 @@ enum mipi_port_id __get_mipi_port(struct atomisp_device *isp,
 	case ATOMISP_CAMERA_PORT_SECONDARY:
 		return MIPI_PORT1_ID;
 	case ATOMISP_CAMERA_PORT_TERTIARY:
-		if (MIPI_PORT1_ID + 1 != N_MIPI_PORT_ID) {
+		if (MIPI_PORT1_ID + 1 != N_MIPI_PORT_ID)
 			return MIPI_PORT1_ID + 1;
-		}
 	/* fall through */
 	default:
 		dev_err(isp->dev, "unsupported port: %d\n", port);
Signature · 1 line
2.25.1
author
#7 lore raw

PATCH v2 1/1 Staging : media : atomisp : fixed a brace coding sytle issue

In reply to Greg KH

From: Ankit Baluni <[email protected]>

Removed braces for a 'if' condition as it contain only single line & there is no need for braces for such case according to coding style rules.

---
Changes in v2:
-Added more description about the patch. -Added space before the symobol '<' in 'From'
and 'Signed-off-by' line.

 drivers/staging/media/atomisp/pci/atomisp_cmd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/media/atomisp/pci/atomisp_cmd.c +1 -2
index 8ea65bef35d2..28b96b66f4f3 100644
@@ -4981,9 +4981,8 @@ enum mipi_port_id __get_mipi_port(struct atomisp_device *isp,
 	case ATOMISP_CAMERA_PORT_SECONDARY:
 		return MIPI_PORT1_ID;
 	case ATOMISP_CAMERA_PORT_TERTIARY:
-		if (MIPI_PORT1_ID + 1 != N_MIPI_PORT_ID) {
+		if (MIPI_PORT1_ID + 1 != N_MIPI_PORT_ID)
 			return MIPI_PORT1_ID + 1;
-		}
 	/* fall through */
 	default:
 		dev_err(isp->dev, "unsupported port: %d\n", port);
Signature · 1 line
2.25.1
#8 lore raw

PATCH v3 1/1 Staging : media : atomisp : fixed a brace coding sytle issue

Removed braces for a 'if' condition as it contain only single line & there is no need for braces for such case according to coding style rules.

---
Changes in v2:
-Added more description about the patch. -Added space before the symobol '<' in 'From'
and 'Signed-off-by' line.
Changes in v3:
-Removed space before ':' in subject line.

 drivers/staging/media/atomisp/pci/atomisp_cmd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/media/atomisp/pci/atomisp_cmd.c +1 -2
index 8ea65bef35d2..28b96b66f4f3 100644
@@ -4981,9 +4981,8 @@ enum mipi_port_id __get_mipi_port(struct atomisp_device *isp,
 	case ATOMISP_CAMERA_PORT_SECONDARY:
 		return MIPI_PORT1_ID;
 	case ATOMISP_CAMERA_PORT_TERTIARY:
-		if (MIPI_PORT1_ID + 1 != N_MIPI_PORT_ID) {
+		if (MIPI_PORT1_ID + 1 != N_MIPI_PORT_ID)
 			return MIPI_PORT1_ID + 1;
-		}
 	/* fall through */
 	default:
 		dev_err(isp->dev, "unsupported port: %d\n", port);
Signature · 1 line
2.25.1
maintainer
#9 lore raw

Re: [PATCH v3] Staging : media : atomisp : fixed a brace coding sytle issue

Quoted 6 lines · Ankit Baluni

Removed braces for a 'if' condition as it contain only single line & there is no need for braces for such case according to coding style rules.

Quoted 7 lines

---
Changes in v2:
-Added more description about the patch. -Added space before the symobol '<' in 'From'
and 'Signed-off-by' line.
Changes in v3:
-Removed space before ':' in subject line.

No you did not :(

#10 lore raw

PATCH v3 1/1 Staging: media: atomisp: fixed a brace coding sytle issue

In reply to Ankit

Removed braces for a 'if' condition as it contain only single line & there is no need for braces for such case according to coding style rules.

---
Changes in v2:
-Added more description about the patch. -Added space before the symobol '<' in 'From'
and 'Signed-off-by' line.
Changes in v3:
-Removed space before ':' in subject line.

 drivers/staging/media/atomisp/pci/atomisp_cmd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/media/atomisp/pci/atomisp_cmd.c +1 -2
index 8ea65bef35d2..28b96b66f4f3 100644
@@ -4981,9 +4981,8 @@ enum mipi_port_id __get_mipi_port(struct atomisp_device *isp,
 	case ATOMISP_CAMERA_PORT_SECONDARY:
 		return MIPI_PORT1_ID;
 	case ATOMISP_CAMERA_PORT_TERTIARY:
-		if (MIPI_PORT1_ID + 1 != N_MIPI_PORT_ID) {
+		if (MIPI_PORT1_ID + 1 != N_MIPI_PORT_ID)
 			return MIPI_PORT1_ID + 1;
-		}
 	/* fall through */
 	default:
 		dev_err(isp->dev, "unsupported port: %d\n", port);
Signature · 1 line
2.25.1
Reviewed-by on v3 1/1
#11 lore raw

Re: [PATCH v3] Staging: media: atomisp: fixed a brace coding sytle issue

Quoted 3 lines · Ankit Baluni

Removed braces for a 'if' condition as it contain only single line & there is no need for braces for such case according to coding style rules.

Quoted 31 lines

---
Changes in v2:
-Added more description about the patch. -Added space before the symobol '<' in 'From'
and 'Signed-off-by' line.
Changes in v3:
-Removed space before ':' in subject line.

 drivers/staging/media/atomisp/pci/atomisp_cmd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/media/atomisp/pci/atomisp_cmd.c +1 -2
index 8ea65bef35d2..28b96b66f4f3 100644
@@ -4981,9 +4981,8 @@ enum mipi_port_id __get_mipi_port(struct atomisp_device *isp,
 	case ATOMISP_CAMERA_PORT_SECONDARY:
 		return MIPI_PORT1_ID;
 	case ATOMISP_CAMERA_PORT_TERTIARY:
-		if (MIPI_PORT1_ID + 1 != N_MIPI_PORT_ID) {
+		if (MIPI_PORT1_ID + 1 != N_MIPI_PORT_ID)
 			return MIPI_PORT1_ID + 1;
-		}
 	/* fall through */
 	default:
 		dev_err(isp->dev, "unsupported port: %d\n", port);
Signature · 1 line
2.25.1
Signature · 2 lines
With Best Regards,
Andy Shevchenko