Linux-Media Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] Staging : media : atomisp : Fixed a brace coding sytle issue
@ 2020-07-28  2:15 Ankit Baluni
  2020-07-29  8:05 ` [PATCH v2] Staging: media: atomisp: " Ankit Baluni
  0 siblings, 1 reply; 6+ messages in thread
From: Ankit Baluni @ 2020-07-28  2:15 UTC (permalink / raw)
  To: mchehab, sakari.ailus, gregkh
  Cc: linux-media, devel, linux-kernel, Ankit Baluni

Fixing coding style issue by removing the braces that are not required.

Signed-off-by: Ankit Baluni<b18007@students.iitmandi.ac.in>
---
 drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
index f8d616f08b51..701de098cb29 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
@@ -1828,11 +1828,10 @@ static int atomisp_streamon(struct file *file, void *fh,
 			dev_err(isp->dev, "master slave sensor stream on failed!\n");
 			goto out;
 		}
-		if (!IS_ISP2401) {
+		if (!IS_ISP2401)
 			__wdt_on_master_slave_sensor(isp, wdt_duration);
-		} else {
+		else
 			__wdt_on_master_slave_sensor_pipe(pipe, wdt_duration, true);
-		}
 		goto start_delay_wq;
 	} else if (asd->depth_mode->val && (atomisp_streaming_count(isp) <
 					    ATOMISP_DEPTH_SENSOR_STREAMON_COUNT)) {
-- 
2.25.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] Staging: media: atomisp: Fixed a brace coding sytle issue
  2020-07-28  2:15 [PATCH] Staging : media : atomisp : Fixed a brace coding sytle issue Ankit Baluni
@ 2020-07-29  8:05 ` Ankit Baluni
  0 siblings, 0 replies; 6+ messages in thread
From: Ankit Baluni @ 2020-07-29  8:05 UTC (permalink / raw)
  To: mchehab, gregkh, sakari.ailus; +Cc: linux-media, devel, linux-kernel, b18007

Removed braces in 'if else' condition as it only consists of 
one line each and according to coding style rules , in this case 
the braces are not required.

Signed-off-by: Ankit Baluni <b18007@students.iitmandi.ac.in>
---
Change in -v2:
	-Removed space before ':' in subject line.
	-Added space before '<' in 'From' and 'Signed-off-by' line.
	-Added detailed description.

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

diff --git a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
index f8d616f08b51..701de098cb29 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
@@ -1828,11 +1828,10 @@ static int atomisp_streamon(struct file *file, void *fh,
 			dev_err(isp->dev, "master slave sensor stream on failed!\n");
 			goto out;
 		}
-		if (!IS_ISP2401) {
+		if (!IS_ISP2401)
 			__wdt_on_master_slave_sensor(isp, wdt_duration);
-		} else {
+		else
 			__wdt_on_master_slave_sensor_pipe(pipe, wdt_duration, true);
-		}
 		goto start_delay_wq;
 	} else if (asd->depth_mode->val && (atomisp_streaming_count(isp) <
 					    ATOMISP_DEPTH_SENSOR_STREAMON_COUNT)) {
-- 
2.25.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] Staging : media : atomisp : fixed a brace coding sytle issue
  2020-07-28  8:43   ` Greg KH
  2020-07-28  9:02     ` Ankit
@ 2020-07-28 22:59     ` Ankit
  1 sibling, 0 replies; 6+ messages in thread
From: Ankit @ 2020-07-28 22:59 UTC (permalink / raw)
  To: mchehab, gregkh, sakari.ailus, andriy.shevchenko
  Cc: linux-media, devel, linux-kernel, b18007

From: Ankit Baluni <b18007@students.iitmandi.ac.in>

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.

Signed-off-by: Ankit Baluni <b18007@students.iitmandi.ac.in>

---
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(-)

diff --git a/drivers/staging/media/atomisp/pci/atomisp_cmd.c b/drivers/staging/media/atomisp/pci/atomisp_cmd.c
index 8ea65bef35d2..28b96b66f4f3 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_cmd.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_cmd.c
@@ -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);
-- 
2.25.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] Staging : media : atomisp : fixed a brace coding sytle issue
  2020-07-28  8:43   ` Greg KH
@ 2020-07-28  9:02     ` Ankit
  2020-07-28 22:59     ` Ankit
  1 sibling, 0 replies; 6+ messages in thread
From: Ankit @ 2020-07-28  9:02 UTC (permalink / raw)
  To: mchehab, gregkh, sakari.ailus, andriy.shevchenko
  Cc: linux-media, devel, linux-kernel, b18007

From: Ankit Baluni <b18007@students.iitmandi.ac.in>

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.

Signed-off-by: Ankit Baluni <b18007@students.iitmandi.ac.in>

---
 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(-)

diff --git a/drivers/staging/media/atomisp/pci/atomisp_cmd.c b/drivers/staging/media/atomisp/pci/atomisp_cmd.c
index 8ea65bef35d2..28b96b66f4f3 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_cmd.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_cmd.c
@@ -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);
-- 
2.25.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] Staging : media : atomisp : fixed a brace coding sytle issue
  2020-07-28  8:23 ` [PATCH v2] " Ankit
@ 2020-07-28  8:43   ` Greg KH
  2020-07-28  9:02     ` Ankit
  2020-07-28 22:59     ` Ankit
  0 siblings, 2 replies; 6+ messages in thread
From: Greg KH @ 2020-07-28  8:43 UTC (permalink / raw)
  To: Ankit
  Cc: mchehab, sakari.ailus, andriy.shevchenko, linux-media, devel,
	linux-kernel

On Tue, Jul 28, 2020 at 01:53:30PM +0530, Ankit wrote:
> From: Ankit Baluni <b18007@students.iitmandi.ac.in>
> 
> 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.
> 
> Signed-off-by: Ankit Baluni <b18007@students.iitmandi.ac.in>
> 
> ---
>  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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] Staging : media : atomisp : fixed a brace coding sytle issue
  2020-07-28  7:37 [PATCH] Staging : media : atomisp : fixed " Greg KH
@ 2020-07-28  8:23 ` Ankit
  2020-07-28  8:43   ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: Ankit @ 2020-07-28  8:23 UTC (permalink / raw)
  To: mchehab, gregkh, sakari.ailus, andriy.shevchenko
  Cc: linux-media, devel, linux-kernel, b18007

From: Ankit Baluni <b18007@students.iitmandi.ac.in>

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.

Signed-off-by: Ankit Baluni <b18007@students.iitmandi.ac.in>

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

diff --git a/drivers/staging/media/atomisp/pci/atomisp_cmd.c b/drivers/staging/media/atomisp/pci/atomisp_cmd.c
index 8ea65bef35d2..28b96b66f4f3 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_cmd.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_cmd.c
@@ -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);
-- 
2.25.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, back to index

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-28  2:15 [PATCH] Staging : media : atomisp : Fixed a brace coding sytle issue Ankit Baluni
2020-07-29  8:05 ` [PATCH v2] Staging: media: atomisp: " Ankit Baluni
2020-07-28  7:37 [PATCH] Staging : media : atomisp : fixed " Greg KH
2020-07-28  8:23 ` [PATCH v2] " Ankit
2020-07-28  8:43   ` Greg KH
2020-07-28  9:02     ` Ankit
2020-07-28 22:59     ` Ankit

Linux-Media Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-media/0 linux-media/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-media linux-media/ https://lore.kernel.org/linux-media \
		linux-media@vger.kernel.org
	public-inbox-index linux-media

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-media


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git