mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matt Wardle <matt@mattwardle.net>
To: Hans de Goede <hansg@kernel.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Andy Shevchenko <andy@kernel.org>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-media@vger.kernel.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org, Matt Wardle <matt@mattwardle.net>
Subject: [PATCH 3/3] staging: media: atomisp: Fix missing braces for statement blocks
Date: Mon, 09 Feb 2026 14:29:28 +0000 (UTC)	[thread overview]
Message-ID: <20260209142820.650334-4-matt@mattwardle.net> (raw)
In-Reply-To: <20260209142820.650334-1-matt@mattwardle.net>

Fix checkpatch.pl checks:

CHECK: Unbalanced braces around else statement
CHECK: braces {} should be used on all arms of this statement
CHECK: Blank lines aren't necessary before a close brace '}'

Signed-off-by: Matt Wardle <matt@mattwardle.net>
---
 .../staging/media/atomisp/pci/base/refcount/src/refcount.c | 7 ++++---
 drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c    | 6 ++++--
 drivers/staging/media/atomisp/pci/sh_css.c                 | 1 -
 drivers/staging/media/atomisp/pci/sh_css_sp.c              | 3 ++-
 4 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/media/atomisp/pci/base/refcount/src/refcount.c b/drivers/staging/media/atomisp/pci/base/refcount/src/refcount.c
index 4a8675d0129a..65dda74614f6 100644
--- a/drivers/staging/media/atomisp/pci/base/refcount/src/refcount.c
+++ b/drivers/staging/media/atomisp/pci/base/refcount/src/refcount.c
@@ -140,13 +140,14 @@ ia_css_ptr ia_css_refcount_increment(s32 id, ia_css_ptr ptr)
 		return mmgr_NULL;
 	}
 
-	if (entry->data == ptr)
+	if (entry->data == ptr) {
 		entry->count += 1;
-	else if (entry->data == mmgr_NULL) {
+	} else if (entry->data == mmgr_NULL) {
 		entry->data = ptr;
 		entry->count = 1;
-	} else
+	} else {
 		return mmgr_NULL;
+	}
 
 	return ptr;
 }
diff --git a/drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c b/drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c
index 9cfb8bc97e24..66e72f2ce288 100644
--- a/drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c
+++ b/drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c
@@ -484,13 +484,15 @@ int ia_css_isys_convert_compressed_format(
 			default:
 				err = -EINVAL;
 			}
-		} else
+		} else {
 			err = -EINVAL;
+		}
 		cfg->csi_port_attr.comp_predictor =
 		    sh_css_csi2_compression_type_2_mipi_predictor(comp->type);
 		cfg->csi_port_attr.comp_enable = true;
-	} else /* No compression */
+	} else { /* No compression */
 		cfg->csi_port_attr.comp_enable = false;
+	}
 	return err;
 }
 
diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/media/atomisp/pci/sh_css.c
index e7f2443696d1..27b552501e7f 100644
--- a/drivers/staging/media/atomisp/pci/sh_css.c
+++ b/drivers/staging/media/atomisp/pci/sh_css.c
@@ -3520,7 +3520,6 @@ ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe,
 		ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
 				    "ia_css_pipe_enqueue_buffer() buf_type=%d, data(DDR address)=0x%x\n",
 				    buf_type, buffer->data.frame->data);
-
 	}
 
 	/* start of test for using rmgr for acq/rel memory */
diff --git a/drivers/staging/media/atomisp/pci/sh_css_sp.c b/drivers/staging/media/atomisp/pci/sh_css_sp.c
index 6da151e7a873..0fb6a90fcbcb 100644
--- a/drivers/staging/media/atomisp/pci/sh_css_sp.c
+++ b/drivers/staging/media/atomisp/pci/sh_css_sp.c
@@ -1484,10 +1484,11 @@ sh_css_update_host2sp_cont_num_raw_frames(unsigned int num_frames,
 						      host2sp_cont_extra_num_raw_frames)
 			       / sizeof(int);
 		store_sp_array_uint(host_sp_com, offset_extra, extra_num_frames);
-	} else
+	} else {
 		offset = (unsigned int)offsetof(struct host_sp_communication,
 						host2sp_cont_target_num_raw_frames)
 			 / sizeof(int);
+	}
 
 	store_sp_array_uint(host_sp_com, offset, num_frames);
 }
-- 
2.53.0


  parent reply	other threads:[~2026-02-09 14:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-09 14:29 [PATCH 0/3] staging: media: atomisp: Fix brace style issues Matt Wardle
2026-02-09 14:29 ` [PATCH 1/3] staging: media: atomisp: Fix braces on incorrect lines Matt Wardle
2026-02-09 15:42   ` Andy Shevchenko
2026-02-09 18:05     ` Matt Wardle
2026-02-09 14:29 ` [PATCH 2/3] staging: media: atomisp: Remove braces for single statement blocks Matt Wardle
2026-02-09 15:37   ` Andy Shevchenko
2026-02-09 14:29 ` Matt Wardle [this message]
2026-02-09 15:44   ` [PATCH 3/3] staging: media: atomisp: Fix missing braces for " Andy Shevchenko

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=20260209142820.650334-4-matt@mattwardle.net \
    --to=matt@mattwardle.net \
    --cc=andy@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hansg@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®