[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230119134218.12280-1-bpappas@pappasbrent.com>
Date: Thu, 19 Jan 2023 08:42:18 -0500
From: Brent Pappas <bpappas@...pasbrent.com>
To: hdegoede@...hat.com
Cc: mchehab@...nel.org, sakari.ailus@...ux.intel.com,
gregkh@...uxfoundation.org, andy@...nel.org,
colin.i.king@...il.com, linux-media@...r.kernel.org,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
Brent Pappas <bpappas@...pasbrent.com>
Subject: [PATCH] media: atomisp: pci: sh_css: Replace macro STATS_ENABLED() with function
Replace the macro STATS_ENABLED() with a static function to conform to
Linux coding style standards.
Signed-off-by: Brent Pappas <bpappas@...pasbrent.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
Powered by blists - more mailing lists