diff mbox series

media: atomisp: pci: sh_css: Replace macro STATS_ENABLED() with function

Message ID 20230119134218.12280-1-bpappas@pappasbrent.com
State New
Headers show
Series media: atomisp: pci: sh_css: Replace macro STATS_ENABLED() with function | expand

Commit Message

Brent Pappas Jan. 19, 2023, 1:42 p.m. UTC
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(-)

Comments

Andy Shevchenko Jan. 19, 2023, 2:07 p.m. UTC | #1
On Thu, Jan 19, 2023 at 3:43 PM Brent Pappas <bpappas@pappasbrent.com> wrote:
>
> Replace the macro STATS_ENABLED() with a static function to conform to
> Linux coding style standards.

I believe the best approach here is to drop that completely and move
its content to be inline in the only caller.
diff mbox series

Patch

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,