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]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux