All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: "linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 3/9] coresight: Remove erroneous dma_free_coherent in tmc_probe
Date: Sun, 12 Jun 2016 14:38:28 -0600	[thread overview]
Message-ID: <CANLsYkwjXR=GfXVwn48qH6s8CS2moqvZ=qccujkjKK4G9n26-g@mail.gmail.com> (raw)
In-Reply-To: <1465204301-24184-4-git-send-email-suzuki.poulose@arm.com>

On 6 June 2016 at 03:11, Suzuki K Poulose <suzuki.poulose@arm.com> wrote:
> commit de5461970b3e9e194 ("coresight: tmc: allocating memory when needed")
> removed the static allocation of buffer for the trace data in ETR mode in
> tmc_probe. However it failed to remove the "devm_free_coherent" in
> tmc_probe when the probe fails due to other reasons. This patch gets
> rid of the incorrect dma_free_coherent() call. Also consolidates the
> error return paths.

Since this set has to go for one more round, please remove the last
line in the commit message.  The error path is consolidated in patch
8/9.

>
> Fixes: commit de5461970b3e9e194 ("coresight: tmc: allocating memory when needed")
> Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
> ---
>  drivers/hwtracing/coresight/coresight-tmc.c | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-tmc.c b/drivers/hwtracing/coresight/coresight-tmc.c
> index 9e02ac9..3978cbb 100644
> --- a/drivers/hwtracing/coresight/coresight-tmc.c
> +++ b/drivers/hwtracing/coresight/coresight-tmc.c
> @@ -388,9 +388,6 @@ static int tmc_probe(struct amba_device *adev, const struct amba_id *id)
>  err_misc_register:
>         coresight_unregister(drvdata->csdev);
>  err_devm_kzalloc:
> -       if (drvdata->config_type == TMC_CONFIG_TYPE_ETR)
> -               dma_free_coherent(dev, drvdata->size,
> -                               drvdata->vaddr, drvdata->paddr);
>         return ret;
>  }
>
> --
> 1.9.1
>

WARNING: multiple messages have this Message-ID (diff)
From: mathieu.poirier@linaro.org (Mathieu Poirier)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 3/9] coresight: Remove erroneous dma_free_coherent in tmc_probe
Date: Sun, 12 Jun 2016 14:38:28 -0600	[thread overview]
Message-ID: <CANLsYkwjXR=GfXVwn48qH6s8CS2moqvZ=qccujkjKK4G9n26-g@mail.gmail.com> (raw)
In-Reply-To: <1465204301-24184-4-git-send-email-suzuki.poulose@arm.com>

On 6 June 2016 at 03:11, Suzuki K Poulose <suzuki.poulose@arm.com> wrote:
> commit de5461970b3e9e194 ("coresight: tmc: allocating memory when needed")
> removed the static allocation of buffer for the trace data in ETR mode in
> tmc_probe. However it failed to remove the "devm_free_coherent" in
> tmc_probe when the probe fails due to other reasons. This patch gets
> rid of the incorrect dma_free_coherent() call. Also consolidates the
> error return paths.

Since this set has to go for one more round, please remove the last
line in the commit message.  The error path is consolidated in patch
8/9.

>
> Fixes: commit de5461970b3e9e194 ("coresight: tmc: allocating memory when needed")
> Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
> ---
>  drivers/hwtracing/coresight/coresight-tmc.c | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-tmc.c b/drivers/hwtracing/coresight/coresight-tmc.c
> index 9e02ac9..3978cbb 100644
> --- a/drivers/hwtracing/coresight/coresight-tmc.c
> +++ b/drivers/hwtracing/coresight/coresight-tmc.c
> @@ -388,9 +388,6 @@ static int tmc_probe(struct amba_device *adev, const struct amba_id *id)
>  err_misc_register:
>         coresight_unregister(drvdata->csdev);
>  err_devm_kzalloc:
> -       if (drvdata->config_type == TMC_CONFIG_TYPE_ETR)
> -               dma_free_coherent(dev, drvdata->size,
> -                               drvdata->vaddr, drvdata->paddr);
>         return ret;
>  }
>
> --
> 1.9.1
>

  reply	other threads:[~2016-06-12 20:38 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-06  9:11 [PATCH v2 0/9] coresight: Miscellaneous fixes Suzuki K Poulose
2016-06-06  9:11 ` Suzuki K Poulose
2016-06-06  9:11 ` [PATCH v2 1/9] coresight: Fix NULL pointer dereference in _coresight_build_path Suzuki K Poulose
2016-06-06  9:11   ` Suzuki K Poulose
2016-06-06  9:11 ` [PATCH v2 2/9] coresight: Fix tmc_read_unprepare_etr Suzuki K Poulose
2016-06-06  9:11   ` Suzuki K Poulose
2016-06-06  9:11 ` [PATCH v2 3/9] coresight: Remove erroneous dma_free_coherent in tmc_probe Suzuki K Poulose
2016-06-06  9:11   ` Suzuki K Poulose
2016-06-12 20:38   ` Mathieu Poirier [this message]
2016-06-12 20:38     ` Mathieu Poirier
2016-06-06  9:11 ` [PATCH v2 4/9] coresight: Fix csdev connections initialisation Suzuki K Poulose
2016-06-06  9:11   ` Suzuki K Poulose
2016-06-12 20:39   ` Mathieu Poirier
2016-06-12 20:39     ` Mathieu Poirier
2016-06-13  8:54     ` Suzuki K Poulose
2016-06-13  8:54       ` Suzuki K Poulose
2016-06-13 14:37       ` Mathieu Poirier
2016-06-13 14:37         ` Mathieu Poirier
2016-06-06  9:11 ` [PATCH v2 5/9] coresight: tmc: Limit the trace to available data Suzuki K Poulose
2016-06-06  9:11   ` Suzuki K Poulose
2016-06-06  9:11 ` [PATCH v2 6/9] coresight: etmv4: Fix ETMv4x peripheral ID table Suzuki K Poulose
2016-06-06  9:11   ` Suzuki K Poulose
2016-06-06  9:11 ` [PATCH v2 7/9] coresight: Cleanup TMC status check Suzuki K Poulose
2016-06-06  9:11   ` Suzuki K Poulose
2016-06-06  9:11 ` [PATCH v2 8/9] coresight: Consolidate error handling path for tmc_probe Suzuki K Poulose
2016-06-06  9:11   ` Suzuki K Poulose
2016-06-06  9:11 ` [PATCH v2 9/9] coresight: Add better messages for coresight_timeout Suzuki K Poulose
2016-06-06  9:11   ` Suzuki K Poulose
2016-06-12 20:36   ` Mathieu Poirier
2016-06-12 20:36     ` Mathieu Poirier
2016-06-10 10:31 ` [PATCH] coresight: Fix erroneous memset in tmc_read_unprepare_etr Suzuki K Poulose
2016-06-10 10:31   ` Suzuki K Poulose
2016-06-12 21:06   ` Mathieu Poirier
2016-06-12 21:06     ` Mathieu Poirier
2016-06-13  8:59     ` Suzuki K Poulose
2016-06-13  8:59       ` Suzuki K Poulose

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='CANLsYkwjXR=GfXVwn48qH6s8CS2moqvZ=qccujkjKK4G9n26-g@mail.gmail.com' \
    --to=mathieu.poirier@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=suzuki.poulose@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.