lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEnQRZAn2W3kD-FsUdjKR7TuYvZwkSXOKBUgwLrqDBeGXV3bFw@mail.gmail.com>
Date:   Wed, 2 Aug 2023 10:54:35 +0300
From:   Daniel Baluta <daniel.baluta@...il.com>
To:     Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
Cc:     Daniel Baluta <daniel.baluta@....nxp.com>, broonie@...nel.org,
        alsa-devel@...a-project.org, robh+dt@...nel.org, spujar@...dia.com,
        tiwai@...e.com, perex@...ex.cz, linux-kernel@...r.kernel.org,
        linux-imx@....com, devicetree@...r.kernel.org
Subject: Re: [PATCH 1/2] ASoC: simple-card: Introduce playback-only/capture
 only DAI link flags

On Wed, Aug 2, 2023 at 2:31 AM Kuninori Morimoto
<kuninori.morimoto.gx@...esas.com> wrote:
>
>
> Hi Daniel
>
> Thank you for your patch.
> This is not a big deal, but...
>
> > We need this to signal that DAI link supports only 1 direction that
> > can only be either playback or capture.
> (snip)
> > +     if (of_property_read_bool(node, "playback-only"))
> > +             is_playback_only = true;
> > +
> > +     if (of_property_read_bool(node, "capture-only"))
> > +             is_capture_only = true;
>
> More simply
>
>         is_playback_only = of_property_read_bool(node, "playback-only");
>         is_capture_only  = of_property_read_bool(node, "capture-only");


Good point. Will fix in v2.

>
> > +     ret = asoc_simple_parse_link_direction(dev, node, prefix,
> > +                                            &is_playback_only,
> > +                                            &is_capture_only);
> > +     if (ret < 0)
> > +             return 0;
> > +
> > +     dai_link->playback_only = is_playback_only;
> > +     dai_link->capture_only = is_capture_only;
>
> It doesn't overwrite when error case, so
> More simply
>
>         ret = asoc_simple_parse_link_direction(dev, node, prefix,
>                                                 &dai_link->playback_only,
>                                                 &dai_link->capture_only);

Can do this because dai_link->playback_only is a bitfield.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ