From: David Miller <davem@davemloft.net>
To: l.stach@pengutronix.de
Cc: fugang.duan@freescale.com, Frank.Li@freescale.com,
netdev@vger.kernel.org, kernel@pengutronix.de,
patchwork-lst@pengutronix.de
Subject: Re: [PATCH 1/2] net: fec: use managed DMA API functions to allocate BD ring
Date: Tue, 21 Jul 2015 00:32:51 -0700 (PDT) [thread overview]
Message-ID: <20150721.003251.609707799765780058.davem@davemloft.net> (raw)
In-Reply-To: <1437400298-17379-1-git-send-email-l.stach@pengutronix.de>
From: Lucas Stach <l.stach@pengutronix.de>
Date: Mon, 20 Jul 2015 15:51:37 +0200
> So it gets freed when the device is going away.
> This fixes a DMA memory leak on driver probe() fail and driver
> remove().
>
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
> drivers/net/ethernet/freescale/fec_main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
> index 349365d85b92..b3287c6b069b 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -3142,7 +3142,7 @@ static int fec_enet_init(struct net_device *ndev)
> fep->bufdesc_size;
>
> /* Allocate memory for buffer descriptors. */
> - cbd_base = dma_alloc_coherent(NULL, bd_size, &bd_dma,
> + cbd_base = dmam_alloc_coherent(&fep->pdev->dev, bd_size, &bd_dma,
> GFP_KERNEL);
When you change the column of the openning parenthesis of a function call, you
must fix up the indentation of the second and subsequent lines so that they all
properly start at the first column after that openning parenthesis.
prev parent reply other threads:[~2015-07-21 7:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-20 13:51 [PATCH 1/2] net: fec: use managed DMA API functions to allocate BD ring Lucas Stach
2015-07-20 13:51 ` [PATCH 2/2] net: fec: introduce fec_ptp_stop and use in probe fail path Lucas Stach
2015-07-21 7:32 ` David Miller [this message]
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=20150721.003251.609707799765780058.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=Frank.Li@freescale.com \
--cc=fugang.duan@freescale.com \
--cc=kernel@pengutronix.de \
--cc=l.stach@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=patchwork-lst@pengutronix.de \
/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).