Skip to content

Commit 450fa21

Browse files
mitsu-kimuradavem330
authored andcommitted
sh_eth: Remove redundant alignment adjustment
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> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 319cd52 commit 450fa21

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/renesas/sh_eth.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,7 @@ static void sh_eth_ring_format(struct net_device *ndev)
11421142

11431143
/* RX descriptor */
11441144
rxdesc = &mdp->rx_ring[i];
1145-
rxdesc->addr = virt_to_phys(PTR_ALIGN(skb->data, 4));
1145+
rxdesc->addr = virt_to_phys(skb->data);
11461146
rxdesc->status = cpu_to_edmac(mdp, RD_RACT | RD_RFP);
11471147

11481148
/* The size of the buffer is 16 byte boundary. */
@@ -1476,7 +1476,7 @@ static int sh_eth_rx(struct net_device *ndev, u32 intr_status, int *quota)
14761476
sh_eth_set_receive_align(skb);
14771477

14781478
skb_checksum_none_assert(skb);
1479-
rxdesc->addr = virt_to_phys(PTR_ALIGN(skb->data, 4));
1479+
rxdesc->addr = virt_to_phys(skb->data);
14801480
}
14811481
if (entry >= mdp->num_rx_ring - 1)
14821482
rxdesc->status |=

0 commit comments

Comments
 (0)