media: atomisp: pci: sh_css: Replace macro STATS_ENABLED() with function
Commit Message
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
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.
@@ -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,