Re: [PATCH 2/7] ASoC: cs42l43: Minor code tidy ups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Wed, Jan 24, 2024 at 6:56 PM Charles Keepax
<ckeepax@xxxxxxxxxxxxxxxxxxxxx> wrote:
>
> Add some missing commas, refactor a couple small bits of code.

...

> -       BUILD_BUG_ON(ARRAY_SIZE(cs42l43_jack_override_modes) !=
> -                    ARRAY_SIZE(cs42l43_jack_text) - 1);
> +       static_assert(ARRAY_SIZE(cs42l43_jack_override_modes) ==
> +                     ARRAY_SIZE(cs42l43_jack_text) - 1);

Now you can move this closer to the both array definitions (as
static_assert() can be global, and basically that is the idea behind
it, besides nicer error messaging).

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Pulseaudio]     [Linux Audio Users]     [ALSA Devel]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux