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: <CA+Px+wV9Lmdphp4iMgF1d72vewb2m9aiZzywvavLGgtkAczCDQ@mail.gmail.com>
Date:   Mon, 2 Nov 2020 18:46:04 +0800
From:   Tzung-Bi Shih <tzungbi@...gle.com>
To:     Ajye Huang <ajye.huang@...il.com>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Mark Brown <broonie@...nel.org>,
        Rohit kumar <rohitkr@...eaurora.org>,
        Banajit Goswami <bgoswami@...eaurora.org>,
        Patrick Lai <plai@...eaurora.org>,
        Srinivasa Rao Mandadapu <srivasam@...eaurora.org>,
        Srini Kandagatla <srinivas.kandagatla@...aro.org>,
        Andy Gross <agross@...nel.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Liam Girdwood <lgirdwood@...il.com>,
        Rob Herring <robh+dt@...nel.org>,
        Jaroslav Kysela <perex@...ex.cz>,
        Cheng-Yi Chiang <cychiang@...omium.org>,
        Tzung-Bi Shih <tzungbi@...omium.org>,
        Douglas Anderson <dianders@...omium.org>,
        "moderated list:ARM/Mediatek SoC support" 
        <linux-arm-kernel@...ts.infradead.org>,
        linux-arm-msm <linux-arm-msm@...r.kernel.org>,
        "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
        <devicetree@...r.kernel.org>,
        ALSA development <alsa-devel@...a-project.org>,
        Ajye Huang <ajye_huang@...pal.corp-partner.google.com>
Subject: Re: [PATCH v3 2/2] ASoC: qcom: sc7180: Modify machine driver for 2mic

On Mon, Nov 2, 2020 at 2:24 PM Ajye Huang <ajye.huang@...il.com> wrote:
>
> In addition, having mixer control to switch between DMICs by
> using "dmic-gpios" property.
>
> Refer to this one as an example,
> commit b7a742cff3f6 ("ASoC: AMD: Use mixer control to switch between DMICs")
>
> Signed-off-by: Ajye Huang <ajye_huang@...pal.corp-partner.google.com>

I am not sure if it would be better if you use another email (e.g.
@gmail) for signoff.

> +static int dmic_get(struct snd_kcontrol *kcontrol,
> +                   struct snd_ctl_elem_value *ucontrol)
> +{
> +       struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kcontrol);
> +       struct sc7180_snd_data *data = snd_soc_card_get_drvdata(dapm->card);
> +
> +       if (data)

You don't need to check for NULL.  If snd_soc_card_get_drvdata()
returns NULL, it shouldn't run into here.  See other
snd_soc_card_get_drvdata() calls in the file.

> +static int dmic_set(struct snd_kcontrol *kcontrol,
> +                   struct snd_ctl_elem_value *ucontrol)
> +{
> +       struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kcontrol);
> +       struct sc7180_snd_data *data = snd_soc_card_get_drvdata(dapm->card);
> +
> +       if (data) {

Ditto.

> +               if (IS_ERR(data->dmic_sel)) {
> +                       dev_err(&pdev->dev, "DMIC gpio failed err=%d\n",
> +                               PTR_ERR(data->dmic_sel));
> +                               return PTR_ERR(data->dmic_sel);

Remove 1 level indent.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ