From patchwork Thu Nov 13 07:04:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Kaneko X-Patchwork-Id: 5293901 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9121E9F440 for ; Thu, 13 Nov 2014 07:05:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BFF17201C7 for ; Thu, 13 Nov 2014 07:05:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E6FC3201E4 for ; Thu, 13 Nov 2014 07:05:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753920AbaKMHFg (ORCPT ); Thu, 13 Nov 2014 02:05:36 -0500 Received: from mail-pa0-f42.google.com ([209.85.220.42]:56511 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751336AbaKMHFe (ORCPT ); Thu, 13 Nov 2014 02:05:34 -0500 Received: by mail-pa0-f42.google.com with SMTP id bj1so14714485pad.15 for ; Wed, 12 Nov 2014 23:05:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=B/L1I+Vh1e0bb92D2DJvOZncmYRuqTh3fgz5DeyVs90=; b=lQHR8QExpkNrctJSvv3zMeViV7eM50WtNHsf04oXYZ7rIh63/I72KlA3JlVFM0BAsY tAURf3Cc8+caKtkV/bqwb9z6kUwUzn2Q5TrwOydUYwykYHFNtIGziEzF/1nXIs2zG+Gl UxaKtNE6Z4gAoaC3jEJ28nRIrB0SJoLc6laqUcfYtdsPWNEMdGIFdZSWK2y7YiCd5meE YETWPCuM6MqJLJ/n6DKas+ehOwc78ZxL+9m8D685p4ishx0lZeoieIuXxP0yEQaduwJi 7pm6GsKwokAhQp93YYFrWQ28GKQYLV/59DgU7JajDLQT7eMgAyrwNd8DUOiduU2Ld8fk fSXg== X-Received: by 10.70.37.164 with SMTP id z4mr646701pdj.3.1415862333115; Wed, 12 Nov 2014 23:05:33 -0800 (PST) Received: from localhost.localdomain (p5095-ipngn6701marunouchi.tokyo.ocn.ne.jp. [153.174.4.95]) by mx.google.com with ESMTPSA id pv7sm6847309pdb.69.2014.11.12.23.05.31 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 12 Nov 2014 23:05:32 -0800 (PST) From: Yoshihiro Kaneko To: netdev@vger.kernel.org Cc: "David S. Miller" , Simon Horman , Magnus Damm , linux-sh@vger.kernel.org Subject: [PATCH 1/3] sh_eth: Remove redundant alignment adjustment Date: Thu, 13 Nov 2014 16:04:59 +0900 Message-Id: <1415862301-28032-2-git-send-email-ykaneko0929@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1415862301-28032-1-git-send-email-ykaneko0929@gmail.com> References: <1415862301-28032-1-git-send-email-ykaneko0929@gmail.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Mitsuhiro Kimura PTR_ALIGN macro after skb_reserve is redundant, because skb_reserve function adjusts the alignment of skb->data. Signed-off-by: Mitsuhiro Kimura Signed-off-by: Yoshihiro Kaneko --- 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 |=