mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Michal Simek <michal.simek@xilinx.com>
Cc: netdev@vger.kernel.org,
	"Sören Brinkmann" <soren.brinkmann@xilinx.com>,
	monstr@monstr.eu, "Fabian Frederick" <fabf@skynet.be>,
	linux-kernel@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>,
	"Manuel Schölling" <manuel.schoelling@gmx.de>,
	"Julia Lawall" <julia.lawall@lip6.fr>,
	"Markus Elfring" <elfring@users.sourceforge.net>,
	"Subbaraya Sundeep Bhatta" <subbaraya.sundeep.bhatta@xilinx.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] net: ll_temac: Fix DMA map size bug
Date: Tue, 12 May 2015 08:03:39 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.02.1505120801390.2075@localhost6.localdomain6> (raw)
In-Reply-To: <d76f13c52ce740544e8fac27f2a5904b9537a226.1431410298.git.michal.simek@xilinx.com>

On Tue, 12 May 2015, Michal Simek wrote:

> DMA allocates skb->len instead of headlen
> which is used for DMA.
> 
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
> 
>  drivers/net/ethernet/xilinx/ll_temac_main.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll_temac_main.c
> index ca640d04fd93..cfb6bdb37fdc 100644
> --- a/drivers/net/ethernet/xilinx/ll_temac_main.c
> +++ b/drivers/net/ethernet/xilinx/ll_temac_main.c
> @@ -705,8 +705,8 @@ static int temac_start_xmit(struct sk_buff *skb, struct net_device *ndev)
>  
>  	cur_p->app0 |= STS_CTRL_APP0_SOP;
>  	cur_p->len = skb_headlen(skb);
> -	cur_p->phys = dma_map_single(ndev->dev.parent, skb->data, skb->len,
> -				     DMA_TO_DEVICE);
> +	cur_p->phys = dma_map_single(ndev->dev.parent, skb->data,
> +				skb_headlen(skb), DMA_TO_DEVICE);

I think you could align the later arguments with the right side of the 
parenthesis, as done in the original code.

julia



>  	cur_p->app4 = (unsigned long)skb;
>  
>  	for (ii = 0; ii < num_frag; ii++) {
> -- 
> 2.3.5
> 
> 

  reply	other threads:[~2015-05-12  6:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-12  5:58 Michal Simek
2015-05-12  6:03 ` Julia Lawall [this message]
2015-05-12  6:06   ` Michal Simek

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=alpine.DEB.2.02.1505120801390.2075@localhost6.localdomain6 \
    --to=julia.lawall@lip6.fr \
    --cc=davem@davemloft.net \
    --cc=elfring@users.sourceforge.net \
    --cc=fabf@skynet.be \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manuel.schoelling@gmx.de \
    --cc=michal.simek@xilinx.com \
    --cc=monstr@monstr.eu \
    --cc=netdev@vger.kernel.org \
    --cc=soren.brinkmann@xilinx.com \
    --cc=subbaraya.sundeep.bhatta@xilinx.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

all inboxes | Powered by JetHome®