linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: michal.simek@xilinx.com (Michal Simek)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] net: ll_temac: Fix DMA map size bug
Date: Tue, 12 May 2015 08:06:31 +0200	[thread overview]
Message-ID: <55519867.2090205@xilinx.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1505120801390.2075@localhost6.localdomain6>

On 05/12/2015 08:03 AM, Julia Lawall wrote:
> 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.

Fixed and send v2.

Thanks,
Michal

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

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-12  5:58 [PATCH] net: ll_temac: Fix DMA map size bug Michal Simek
2015-05-12  6:03 ` Julia Lawall
2015-05-12  6:06   ` Michal Simek [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=55519867.2090205@xilinx.com \
    --to=michal.simek@xilinx.com \
    --cc=linux-arm-kernel@lists.infradead.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).