alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Keyon Jie <yang.jie@linux.intel.com>
To: Colin King <colin.king@canonical.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>,
	alsa-devel@alsa-project.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: intel: remove unused variable data and associated code
Date: Mon, 27 Mar 2017 17:41:29 +0800	[thread overview]
Message-ID: <58D8DE49.5030306@linux.intel.com> (raw)
In-Reply-To: <20170322143644.29051-1-colin.king@canonical.com>


On 2017年03月22日 22:36, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable 'data' is assigned null and never re-assigned. There
> is also a redundant check for data being non-null which is always
> false, so remove this and the variable data and dma_addr as they
> are not used once the dead code has been removed.
>
> Detected with CoverityScan, CID#1324015 ("'Constant' variable gaurds
> dead code")
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Thank you for fixing it.

Acked-by: Jie Yang <yang.jie@intel.com>

thanks,
~Keyon

> ---
>   sound/soc/intel/haswell/sst-haswell-ipc.c | 6 ------
>   1 file changed, 6 deletions(-)
>
> diff --git a/sound/soc/intel/haswell/sst-haswell-ipc.c b/sound/soc/intel/haswell/sst-haswell-ipc.c
> index a3459d1682a6..d33bdaf92c57 100644
> --- a/sound/soc/intel/haswell/sst-haswell-ipc.c
> +++ b/sound/soc/intel/haswell/sst-haswell-ipc.c
> @@ -2000,10 +2000,8 @@ int sst_hsw_module_set_param(struct sst_hsw *hsw,
>   	u32 param_size, char *param)
>   {
>   	int ret;
> -	unsigned char *data = NULL;
>   	u32 header = 0;
>   	u32 payload_size = 0, transfer_parameter_size = 0;
> -	dma_addr_t dma_addr = 0;
>   	struct sst_hsw_transfer_parameter *parameter;
>   	struct device *dev = hsw->dev;
>
> @@ -2047,10 +2045,6 @@ int sst_hsw_module_set_param(struct sst_hsw *hsw,
>
>   	kfree(parameter);
>
> -	if (data)
> -		dma_free_coherent(hsw->dsp->dma_dev,
> -			param_size, (void *)data, dma_addr);
> -
>   	return ret;
>   }
>
>
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply	other threads:[~2017-03-27  9:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-22 14:36 [PATCH] ASoC: intel: remove unused variable data and associated code Colin King
2017-03-27  9:41 ` Keyon Jie [this message]
2017-03-27 11:32 ` Applied "ASoC: intel: remove unused variable data and associated code" to the asoc tree Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=58D8DE49.5030306@linux.intel.com \
    --to=yang.jie@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=colin.king@canonical.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).