All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martiros Shakhzadyan <vrzh@vrzh.net>
To: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Martiros Shakhzadyan <vrzh@vrzh.net>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	linux-media@vger.kernel.org
Subject: [PATCH] staging: media: atomisp: [6/6] Fix sh_css.c brace coding style issues
Date: Wed, 14 Apr 2021 20:51:03 -0400	[thread overview]
Message-ID: <20210415005106.530914-7-vrzh@vrzh.net> (raw)
In-Reply-To: <20210415005106.530914-1-vrzh@vrzh.net>

Fix brace coding style issues.

Signed-off-by: Martiros Shakhzadyan <vrzh@vrzh.net>
---
 drivers/staging/media/atomisp/pci/sh_css.c | 30 ++++++++++------------
 1 file changed, 13 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/media/atomisp/pci/sh_css.c
index 0c9324684076..bb752d47457c 100644
--- a/drivers/staging/media/atomisp/pci/sh_css.c
+++ b/drivers/staging/media/atomisp/pci/sh_css.c
@@ -2161,10 +2161,10 @@ static const struct ia_css_yuvpp_settings yuvpp = IA_CSS_DEFAULT_YUVPP_SETTINGS;
 static int
 init_pipe_defaults(enum ia_css_pipe_mode mode,
 		   struct ia_css_pipe *pipe,
-		   bool copy_pipe) {
+		   bool copy_pipe)
+{
 
-	if (!pipe)
-	{
+	if (!pipe) {
 		IA_CSS_ERROR("NULL pipe parameter");
 		return -EINVAL;
 	}
@@ -2173,18 +2173,17 @@ init_pipe_defaults(enum ia_css_pipe_mode mode,
 	memcpy(pipe, &default_pipe, sizeof(default_pipe));
 
 	/* TODO: JB should not be needed, but temporary backward reference */
-	switch (mode)
-	{
+	switch (mode) {
 	case IA_CSS_PIPE_MODE_PREVIEW:
 		pipe->mode = IA_CSS_PIPE_ID_PREVIEW;
 		memcpy(&pipe->pipe_settings.preview, &preview, sizeof(preview));
 		break;
 	case IA_CSS_PIPE_MODE_CAPTURE:
-		if (copy_pipe) {
+		if (copy_pipe)
 			pipe->mode = IA_CSS_PIPE_ID_COPY;
-		} else {
+		else
 			pipe->mode = IA_CSS_PIPE_ID_CAPTURE;
-		}
+
 		memcpy(&pipe->pipe_settings.capture, &capture, sizeof(capture));
 		break;
 	case IA_CSS_PIPE_MODE_VIDEO:
@@ -2214,27 +2213,25 @@ pipe_global_init(void)
 	u8 i;
 
 	my_css.pipe_counter = 0;
-	for (i = 0; i < IA_CSS_PIPELINE_NUM_MAX; i++) {
+	for (i = 0; i < IA_CSS_PIPELINE_NUM_MAX; i++)
 		my_css.all_pipes[i] = NULL;
-	}
 }
 
 static int
 pipe_generate_pipe_num(const struct ia_css_pipe *pipe,
-		       unsigned int *pipe_number) {
+		       unsigned int *pipe_number)
+{
 	const u8 INVALID_PIPE_NUM = (uint8_t)~(0);
 	u8 pipe_num = INVALID_PIPE_NUM;
 	u8 i;
 
-	if (!pipe)
-	{
+	if (!pipe) {
 		IA_CSS_ERROR("NULL pipe parameter");
 		return -EINVAL;
 	}
 
 	/* Assign a new pipe_num .... search for empty place */
-	for (i = 0; i < IA_CSS_PIPELINE_NUM_MAX; i++)
-	{
+	for (i = 0; i < IA_CSS_PIPELINE_NUM_MAX; i++) {
 		if (!my_css.all_pipes[i]) {
 			/*position is reserved */
 			my_css.all_pipes[i] = (struct ia_css_pipe *)pipe;
@@ -2242,8 +2239,7 @@ pipe_generate_pipe_num(const struct ia_css_pipe *pipe,
 			break;
 		}
 	}
-	if (pipe_num == INVALID_PIPE_NUM)
-	{
+	if (pipe_num == INVALID_PIPE_NUM) {
 		/* Max number of pipes already allocated */
 		IA_CSS_ERROR("Max number of pipes already created");
 		return -ENOSPC;
-- 
2.31.1


  parent reply	other threads:[~2021-04-15  0:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-15  0:50 [PATCH] staging: media: atomisp: cleaning up sh_css.c Martiros Shakhzadyan
2021-04-15  0:50 ` [PATCH] staging: media: atomisp: [1/6] Fix sh_css.c brace coding style issues Martiros Shakhzadyan
2021-04-15  0:50 ` [PATCH] staging: media: atomisp: [2/6] " Martiros Shakhzadyan
2021-04-15  0:51 ` [PATCH] staging: media: atomisp: [3/6] " Martiros Shakhzadyan
2021-04-15  0:51 ` [PATCH] staging: media: atomisp: [4/6] " Martiros Shakhzadyan
2021-04-15  0:51 ` [PATCH] staging: media: atomisp: [5/6] " Martiros Shakhzadyan
2021-04-15  0:51 ` Martiros Shakhzadyan [this message]
2021-04-15  0:51 ` [PATCH] staging: media: atomisp: Use goto instead of return in ia_css_init() Martiros Shakhzadyan
2021-04-15 13:56   ` Hans Verkuil
2021-04-15 16:39     ` Martiros Shakhzadyan
2021-04-15  0:51 ` [PATCH] staging: media: atomisp: [1/2] Remove redundant assertions in sh_css.c Martiros Shakhzadyan
2021-04-15 13:46   ` Hans Verkuil
2021-04-15  0:51 ` [PATCH] staging: media: atomisp: [2/2] " Martiros Shakhzadyan
2021-04-15 13:59 ` [PATCH] staging: media: atomisp: cleaning up sh_css.c Hans Verkuil
2021-04-15 16:29   ` Martiros Shakhzadyan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210415005106.530914-7-vrzh@vrzh.net \
    --to=vrzh@vrzh.net \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.