linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yoshihiro Kaneko <ykaneko0929@gmail.com>
To: netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
	Simon Horman <horms@verge.net.au>,
	Magnus Damm <magnus.damm@gmail.com>,
	linux-sh@vger.kernel.org
Subject: [PATCH 1/3] sh_eth: Remove redundant alignment adjustment
Date: Thu, 13 Nov 2014 07:04:59 +0000	[thread overview]
Message-ID: <1415862301-28032-2-git-send-email-ykaneko0929@gmail.com> (raw)
In-Reply-To: <1415862301-28032-1-git-send-email-ykaneko0929@gmail.com>

From: Mitsuhiro Kimura <mitsuhiro.kimura.kc@renesas.com>

PTR_ALIGN macro after skb_reserve is redundant, because skb_reserve
function adjusts the alignment of skb->data.

Signed-off-by: Mitsuhiro Kimura <mitsuhiro.kimura.kc@renesas.com>
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
---
 drivers/net/ethernet/renesas/sh_eth.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
index 60e9c2c..49e963e 100644
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
@@ -1141,7 +1141,7 @@ static void sh_eth_ring_format(struct net_device *ndev)
 
 		/* RX descriptor */
 		rxdesc = &mdp->rx_ring[i];
-		rxdesc->addr = virt_to_phys(PTR_ALIGN(skb->data, 4));
+		rxdesc->addr = virt_to_phys(skb->data);
 		rxdesc->status = cpu_to_edmac(mdp, RD_RACT | RD_RFP);
 
 		/* The size of the buffer is 16 byte boundary. */
@@ -1477,7 +1477,7 @@ static int sh_eth_rx(struct net_device *ndev, u32 intr_status, int *quota)
 			sh_eth_set_receive_align(skb);
 
 			skb_checksum_none_assert(skb);
-			rxdesc->addr = virt_to_phys(PTR_ALIGN(skb->data, 4));
+			rxdesc->addr = virt_to_phys(skb->data);
 		}
 		if (entry >= mdp->num_rx_ring - 1)
 			rxdesc->status |-- 
1.9.1


  reply	other threads:[~2014-11-13  7:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-13  7:04 [PATCH 0/3] sh_eth: Remove redundant alignment adjustment Yoshihiro Kaneko
2014-11-13  7:04 ` Yoshihiro Kaneko [this message]
2014-11-13 22:37   ` [PATCH 1/3] " Sergei Shtylyov
2014-11-14  0:43     ` Simon Horman
2014-11-13  7:05 ` [PATCH 2/3] sh_eth: Fix skb alloc size and alignment adjust rule Yoshihiro Kaneko
2014-11-13 22:48   ` Sergei Shtylyov
2014-11-13  7:05 ` [PATCH 3/3] sh_eth: Fix dma mapping issue Yoshihiro Kaneko
2014-11-13 23:05   ` Sergei Shtylyov
2014-11-17  4:09     ` Simon Horman
2014-11-25 20:07       ` Sergei Shtylyov
2014-11-13  9:04 ` [PATCH 0/3] sh_eth: Remove redundant alignment adjustment Geert Uytterhoeven

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=1415862301-28032-2-git-send-email-ykaneko0929@gmail.com \
    --to=ykaneko0929@gmail.com \
    --cc=davem@davemloft.net \
    --cc=horms@verge.net.au \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.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).