summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorBrent Pappas <bpappas@pappasbrent.com>2023-01-20 20:14:08 +0300
committerMauro Carvalho Chehab <mchehab@kernel.org>2023-02-08 10:24:35 +0300
commit738dfb32f1305478c2c1b87e997142cefad4ad7e (patch)
treebcf3face99db97f0b922fc547c6d67ed6d328ce3 /drivers/staging
parent197ec0f48d7a3aff984c2502af315e5d3e48eedb (diff)
downloadlinux-738dfb32f1305478c2c1b87e997142cefad4ad7e.tar.xz
media: atomisp: pci: sh_css: Inline single invocation of macro STATS_ENABLED()
Inline the single invocation of the macro STATS_ENABLED(). The macro abstraction is not necessary because the logic behind it is only used once. Link: https://lore.kernel.org/r/20230120171408.16099-1-bpappas@pappasbrent.com Signed-off-by: Brent Pappas <bpappas@pappasbrent.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/media/atomisp/pci/sh_css.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/media/atomisp/pci/sh_css.c
index 726cb7aa4ecd..93789500416f 100644
--- a/drivers/staging/media/atomisp/pci/sh_css.c
+++ b/drivers/staging/media/atomisp/pci/sh_css.c
@@ -97,9 +97,6 @@
*/
#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))
-
struct sh_css my_css;
int __printf(1, 0) (*sh_css_printf)(const char *fmt, va_list args) = NULL;
@@ -3743,7 +3740,9 @@ 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 (stage->binary && stage->binary->info &&
+ (stage->binary->info->sp.enable.s3a ||
+ stage->binary->info->sp.enable.dis)) {
/* there is a stage that needs it */
return_err = ia_css_bufq_enqueue_buffer(thread_id,
queue_id,