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]
Date:   Tue, 27 Apr 2021 11:50:53 -0700
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     Yang Li <yang.lee@...ux.alibaba.com>
Cc:     Jaroslav Kysela <perex@...ex.cz>, srinivas.kandagatla@...aro.org,
        bgoswami@...eaurora.org, Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>, Takashi Iwai <tiwai@...e.com>,
        Nathan Chancellor <nathan@...nel.org>,
        alsa-devel@...a-project.org, LKML <linux-kernel@...r.kernel.org>,
        clang-built-linux <clang-built-linux@...glegroups.com>,
        Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
Subject: Re: [PATCH] ASoC: q6dsp: q6afe: remove unneeded dead-store initialization

On Sun, Apr 25, 2021 at 3:12 AM Yang Li <yang.lee@...ux.alibaba.com> wrote:
>
> Variables 'wait' and 'port_id' are being initialized, however the
> values are never read and updated later on, hence the redundant
> initializations can be removed.
>
> Cleans up clang warnings:
> sound/soc/qcom/qdsp6/q6afe.c:933:21: warning: Value stored to 'wait'
> during its initialization is never read
> sound/soc/qcom/qdsp6/q6afe.c:1186:6: warning: Value stored to 'port_id'
> during its initialization is never read
>
> Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@...ux.alibaba.com>

Thanks for the patch, but it looks like this has already been fixed in:
https://lore.kernel.org/alsa-devel/20210218222916.89809-5-pierre-louis.bossart@linux.intel.com/


> ---
>  sound/soc/qcom/qdsp6/q6afe.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/qcom/qdsp6/q6afe.c b/sound/soc/qcom/qdsp6/q6afe.c
> index cad1cd1..442bf27 100644
> --- a/sound/soc/qcom/qdsp6/q6afe.c
> +++ b/sound/soc/qcom/qdsp6/q6afe.c
> @@ -930,7 +930,7 @@ int q6afe_get_port_id(int index)
>  static int afe_apr_send_pkt(struct q6afe *afe, struct apr_pkt *pkt,
>                             struct q6afe_port *port, uint32_t rsp_opcode)
>  {
> -       wait_queue_head_t *wait = &port->wait;
> +       wait_queue_head_t *wait;
>         struct aprv2_ibasic_rsp_result_t *result;
>         int ret;
>
> @@ -1183,7 +1183,7 @@ int q6afe_port_stop(struct q6afe_port *port)
>         struct afe_port_cmd_device_stop *stop;
>         struct q6afe *afe = port->afe;
>         struct apr_pkt *pkt;
> -       int port_id = port->id;
> +       int port_id;
>         int ret = 0;
>         int index, pkt_size;
>         void *p;
> --
> 1.8.3.1
>


-- 
Thanks,
~Nick Desaulniers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ