Re: [PATCH v3 11/12] ASoC: codecs: Add support for the generic IIO auxiliary devices

From: Andy Shevchenko
Date: Tue Jun 13 2023 - 09:25:42 EST


On Tue, Jun 13, 2023 at 12:37 PM Herve Codina <herve.codina@xxxxxxxxxxx> wrote:
> On Mon, 12 Jun 2023 17:37:00 +0300
> Andy Shevchenko <andy.shevchenko@xxxxxxxxx> wrote:

...

> > > + struct snd_kcontrol_new control = {0};
> >
> > 0 is not needed.
>
> Not for this one.
>
> The variable is in stack.
> Some of the structure members will be set in the code but we need to ensure
> that all others are set to 0.

Yes, and as I said, 0 is not needed. Compiler assumes that if you just
use plain {}.

--
With Best Regards,
Andy Shevchenko