Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1517153 > unrolled thread
| Started by | Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> |
|---|---|
| First post | 2016-11-08 14:20 +0100 |
| Last post | 2016-11-09 00:30 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] net: ethernet: ti: davinci_cpdma: free memory while channel destroy Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> - 2016-11-08 14:20 +0100
Re: [PATCH] net: ethernet: ti: davinci_cpdma: free memory while channel destroy Grygorii Strashko <grygorii.strashko@ti.com> - 2016-11-09 00:30 +0100
| From | Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> |
|---|---|
| Date | 2016-11-08 14:20 +0100 |
| Subject | [PATCH] net: ethernet: ti: davinci_cpdma: free memory while channel destroy |
| Message-ID | <sBetH-1nU-5@gated-at.bofh.it> |
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> --- 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); -- 1.9.1
[toc] | [next] | [standalone]
| From | Grygorii Strashko <grygorii.strashko@ti.com> |
|---|---|
| Date | 2016-11-09 00:30 +0100 |
| Subject | Re: [PATCH] net: ethernet: ti: davinci_cpdma: free memory while channel destroy |
| Message-ID | <sBo01-7H0-3@gated-at.bofh.it> |
| In reply to | #1517153 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web