linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brent Pappas <bpappas@pappasbrent.com>
To: hdegoede@redhat.com
Cc: mchehab@kernel.org, sakari.ailus@linux.intel.com,
	gregkh@linuxfoundation.org, andy@kernel.org,
	colin.i.king@gmail.com, linux-media@vger.kernel.org,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	Brent Pappas <bpappas@pappasbrent.com>
Subject: [PATCH] media: atomisp: pci: sh_css: Replace macro STATS_ENABLED() with function
Date: Thu, 19 Jan 2023 08:42:18 -0500	[thread overview]
Message-ID: <20230119134218.12280-1-bpappas@pappasbrent.com> (raw)

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


             reply	other threads:[~2023-01-19 13:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-19 13:42 Brent Pappas [this message]
2023-01-19 14:07 ` [PATCH] media: atomisp: pci: sh_css: Replace macro STATS_ENABLED() with function 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

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=20230119134218.12280-1-bpappas@pappasbrent.com \
    --to=bpappas@pappasbrent.com \
    --cc=andy@kernel.org \
    --cc=colin.i.king@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --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;
as well as URLs for NNTP newsgroup(s).