linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: atomisp: pci: sh_css: Replace macro STATS_ENABLED() with function
@ 2023-01-19 13:42 Brent Pappas
  2023-01-19 14:07 ` Andy Shevchenko
  0 siblings, 1 reply; 8+ messages in thread
From: Brent Pappas @ 2023-01-19 13:42 UTC (permalink / raw)
  To: hdegoede
  Cc: mchehab, sakari.ailus, gregkh, andy, colin.i.king, linux-media,
	linux-staging, linux-kernel, Brent Pappas

Replace the macro STATS_ENABLED() with a static function to conform to
Linux coding style standards.

Signed-off-by: Brent Pappas <bpappas@pappasbrent.com>
---
 drivers/staging/media/atomisp/pci/sh_css.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/media/atomisp/pci/sh_css.c
index 726cb7aa4ecd..753b3e0fcb07 100644
--- a/drivers/staging/media/atomisp/pci/sh_css.c
+++ b/drivers/staging/media/atomisp/pci/sh_css.c
@@ -97,8 +97,12 @@
  */
 #define JPEG_BYTES (16 * 1024 * 1024)
 
-#define STATS_ENABLED(stage) (stage && stage->binary && stage->binary->info && \
-	(stage->binary->info->sp.enable.s3a || stage->binary->info->sp.enable.dis))
+static bool stats_enabled(struct ia_css_pipeline_stage *stage)
+{
+	return stage && stage->binary && stage->binary->info &&
+	       (stage->binary->info->sp.enable.s3a ||
+		stage->binary->info->sp.enable.dis);
+}
 
 struct sh_css my_css;
 
@@ -3743,7 +3747,7 @@ ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe,
 			 * The SP will read the params after it got
 			 * empty 3a and dis
 			 */
-			if (STATS_ENABLED(stage)) {
+			if (stats_enabled(stage)) {
 				/* there is a stage that needs it */
 				return_err = ia_css_bufq_enqueue_buffer(thread_id,
 									queue_id,
-- 
2.34.1


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

end of thread, other threads:[~2023-01-23 12:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-19 13:42 [PATCH] media: atomisp: pci: sh_css: Replace macro STATS_ENABLED() with function Brent Pappas
2023-01-19 14:07 ` Andy Shevchenko
2023-01-19 14:42   ` [PATCH v2] media: atomisp: pci: sh_css: Inline single invocation of macro STATS_ENABLED() Brent Pappas
2023-01-19 14:54     ` Dan Carpenter
2023-01-20 17:14       ` [PATCH v3] " Brent Pappas
2023-01-20 17:38         ` Andy Shevchenko
2023-01-23 12:04         ` Dan Carpenter
2023-01-23 12:28         ` Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).