linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grygorii Strashko <grygorii.strashko@ti.com>
To: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>,
	<mugunthanvnm@ti.com>, <netdev@vger.kernel.org>
Cc: <linux-omap@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] net: ethernet: ti: davinci_cpdma: free memory while channel destroy
Date: Tue, 8 Nov 2016 17:22:09 -0600	[thread overview]
Message-ID: <366a66b8-33f4-2ad7-4ac4-957d25348718@ti.com> (raw)
In-Reply-To: <1478610965-25288-1-git-send-email-ivan.khoronzhuk@linaro.org>



On 11/08/2016 07:16 AM, Ivan Khoronzhuk wrote:
> While create/destroy channel operation memory is not freed. It was
> supposed that memory is freed while driver remove. But a channel
> can be created and destroyed many times while changing number of
> channels with ethtool.
>
> Based on net-next/master

^?

>
> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>

Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>

> ---
>  drivers/net/ethernet/ti/davinci_cpdma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c b/drivers/net/ethernet/ti/davinci_cpdma.c
> index 05afc05..07fc92d 100644
> --- a/drivers/net/ethernet/ti/davinci_cpdma.c
> +++ b/drivers/net/ethernet/ti/davinci_cpdma.c
> @@ -586,7 +586,7 @@ int cpdma_chan_destroy(struct cpdma_chan *chan)
>  		cpdma_chan_stop(chan);
>  	ctlr->channels[chan->chan_num] = NULL;
>  	ctlr->chan_num--;
> -
> +	devm_kfree(ctlr->dev, chan);
>  	cpdma_chan_split_pool(ctlr);
>
>  	spin_unlock_irqrestore(&ctlr->lock, flags);
>

-- 
regards,
-grygorii

  reply	other threads:[~2016-11-08 23:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-08 13:16 [PATCH] net: ethernet: ti: davinci_cpdma: free memory while channel destroy Ivan Khoronzhuk
2016-11-08 23:22 ` Grygorii Strashko [this message]
2016-11-13  2:07 ` David Miller

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=366a66b8-33f4-2ad7-4ac4-957d25348718@ti.com \
    --to=grygorii.strashko@ti.com \
    --cc=ivan.khoronzhuk@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mugunthanvnm@ti.com \
    --cc=netdev@vger.kernel.org \
    /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).