[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y8lZreSphK6DIkJg@kadam>
Date: Thu, 19 Jan 2023 17:54:37 +0300
From: Dan Carpenter <error27@...il.com>
To: Brent Pappas <bpappas@...pasbrent.com>
Cc: andy.shevchenko@...il.com, andy@...nel.org, colin.i.king@...il.com,
gregkh@...uxfoundation.org, hdegoede@...hat.com,
linux-kernel@...r.kernel.org, linux-media@...r.kernel.org,
linux-staging@...ts.linux.dev, mchehab@...nel.org,
sakari.ailus@...ux.intel.com
Subject: Re: [PATCH v2] media: atomisp: pci: sh_css: Inline single invocation
of macro STATS_ENABLED()
On Thu, Jan 19, 2023 at 09:42:03AM -0500, Brent Pappas wrote:
> Inline the single invocation of the macro STATS_ENABLED().
> The macro abstraction is not necessary because the logic behind it is only
> used once.
>
> Signed-off-by: Brent Pappas <bpappas@...pasbrent.com>
> ---
Needs a V2: note which says what changed.
> drivers/staging/media/atomisp/pci/sh_css.c | 7 +++----
> 1 file 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 && stage->binary && stage->binary->info &&
^^^^^^^^
We know that "stage" must be non-NULL. You should wait over night
before resending v2 patches so that we think "This guy spend overnight
running tests. He must be very serious." There is no rush.
regards,
dan carpenter
Powered by blists - more mailing lists