From: Hans de Goede <hdegoede@redhat.com>
To: Brent Pappas <bpappas@pappasbrent.com>, error27@gmail.com
Cc: andy.shevchenko@gmail.com, andy@kernel.org,
colin.i.king@gmail.com, gregkh@linuxfoundation.org,
linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
linux-staging@lists.linux.dev, mchehab@kernel.org,
sakari.ailus@linux.intel.com
Subject: Re: [PATCH v3] media: atomisp: pci: sh_css: Inline single invocation of macro STATS_ENABLED()
Date: Mon, 23 Jan 2023 13:28:11 +0100 [thread overview]
Message-ID: <e72e4f4b-4e07-a57c-2a09-cbc93cfd89dc@redhat.com> (raw)
In-Reply-To: <20230120171408.16099-1-bpappas@pappasbrent.com>
Hi,
On 1/20/23 18:14, 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@pappasbrent.com>
Thank you.
I have added this to my personal git tree now and I will include
this in the atomisp driver pull-req which I will send to the
media-subsystem maintainer in a couple of weeks.
Regards,
Hans
> ---
> Changelog:
> V1 -> V2: Inline macro instead of replacing it with a function.
>
> V2 -> V3: Remove unnecessary check that stage is non-null.
>
> 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->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,
prev parent reply other threads:[~2023-01-23 12:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-19 13:42 [PATCH] media: atomisp: pci: sh_css: Replace macro STATS_ENABLED() with function Brent Pappas
2023-01-19 14:07 ` 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 [this message]
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=e72e4f4b-4e07-a57c-2a09-cbc93cfd89dc@redhat.com \
--to=hdegoede@redhat.com \
--cc=andy.shevchenko@gmail.com \
--cc=andy@kernel.org \
--cc=bpappas@pappasbrent.com \
--cc=colin.i.king@gmail.com \
--cc=error27@gmail.com \
--cc=gregkh@linuxfoundation.org \
--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).