Re: [PATCH] staging: media: atomisp: refactor pipe graph dump stage formatting
From: Neal Patalay
Date: Sat Jul 04 2026 - 23:28:31 EST
On Thu, Jul 2, 2026 at 2:11 AM Andy Shevchenko
<andriy.shevchenko@xxxxxxxxx> wrote:
> strscpy()
Thanks, I'll fix this.
> Nope. Find the actual commit in the history.
I'll fix this too.
> So, this makes code much better if
>
> if (!flag)
> return;
>
> BUT, the usual way of such functions is to make check in the caller(s) and drop
> this "flag" completely.
I'll drop the flag entirely and do the check directly in the macro.
> Use logical split and make this all to be shorter.
I'll shorten all of the long lines.
> Instead of doing this way, consider making an string literal array and just
> loop over it. This might need to reconsider representation of those flags
> as well. Yet, don't come to the conclusion, you need to try and see which
> one is better. The current approach is okay if my suggestion will look less
> readable.
I considered this, but I found that the string literal array based approach is
less readable in this case as the flags are less obviously mapped to the flag
names compared to the macro approach. However, I can implement this using
that approach at your request.
--
Thank you,
Neal Patalay