From patchwork Sun May 1 15:19:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Kaneko X-Patchwork-Id: 8988951 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-renesas-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 80F17BF29F for ; Sun, 1 May 2016 15:20:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C474620138 for ; Sun, 1 May 2016 15:20:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1507320123 for ; Sun, 1 May 2016 15:20:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751502AbcEAPUJ (ORCPT ); Sun, 1 May 2016 11:20:09 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:36549 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751399AbcEAPUI (ORCPT ); Sun, 1 May 2016 11:20:08 -0400 Received: by mail-pf0-f195.google.com with SMTP id p185so19171023pfb.3; Sun, 01 May 2016 08:20:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=fLjkPVtVMOegZWSzhQnatjFOlZ3gKZbNdzvdSutWhyc=; b=e4qdjzJUBQOGV/uk7FhVqCO8MDF9roKf/rYS/Z2XtlBR73KW9mpW3e1siHlo/WjfdJ fNRQOIj8Vu727XJJ/e998b8fzCMTq0yLmkffWdWr/chNI0f/iiuJshn25b/lVwMndRsv gO0XweX6wag8aBI/YCmzelOZpPoQocpozHmVWXpwPHSIwU2Lt+z0XxTCfSPJdbbdczei FINiilJieSyGh19q3qOzuMMbyJ6cogFLEaaCvEBgl2LbyAtoZmARNsegQAhq6RdAvY3R N4fpfkAa3rPtcLAClfrzPX0MrzG8yQtjnpdkMKLCxa46nHLDTIfRAqZB0XhWpeKHjsG/ jIgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=fLjkPVtVMOegZWSzhQnatjFOlZ3gKZbNdzvdSutWhyc=; b=hoVOsNmbFstaKG+JI62cCbzfQNqeDrwQhHvQzAz3ydaIspl2qGGg0+OZf6LIXS8s/W do4hdHSvAsGyvl6X/qHdflMF5qQeNl1qchDxwG/Mpvj/bD5/iTlEZT0wy8UN9jtf96qW eQPb+87pJ3mUgld+XucObzxsUcXXA7BuDjYNchse0HXqC5L3mPRpH3ZADUVA14+DCF2Z ols3qXjG/dPTRpHnRHE3+NCNZ/tEJBQtuBjoGvsN9yrkvziRIKv5lC5VkPI4qgTFoH0R DYmcGU9w1iqrVyGQ/HQkNASO0GAcdJA4pE/Uj1OLFlbRFt4zWiCU6XKLm1Y7qE1L8gWp dVMQ== X-Gm-Message-State: AOPr4FUDLubQDg3n7oxqCSOewZCmozgissMeTID4S1rUgQOYbKf7n/duVPxP8vUxFVkkkA== X-Received: by 10.98.9.83 with SMTP id e80mr44876075pfd.34.1462116007330; Sun, 01 May 2016 08:20:07 -0700 (PDT) Received: from localhost.localdomain (KD118152108246.ppp-bb.dion.ne.jp. [118.152.108.246]) by smtp.gmail.com with ESMTPSA id s23sm38221866pfj.86.2016.05.01.08.20.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 01 May 2016 08:20:06 -0700 (PDT) From: Yoshihiro Kaneko To: netdev@vger.kernel.org Cc: "David S. Miller" , Sergei Shtylyov , Simon Horman , Magnus Damm , linux-renesas-soc@vger.kernel.org Subject: [PATCH net-next v2] ravb: Remove rx buffer ALIGN Date: Mon, 2 May 2016 00:19:51 +0900 Message-Id: <1462115991-27241-1-git-send-email-ykaneko0929@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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: Kazuya Mizuguchi Aligning the reception data size is not required. Signed-off-by: Kazuya Mizuguchi Signed-off-by: Yoshihiro Kaneko Tested-by: Simon Horman Acked-by: Sergei Shtylyov --- This patch is based on the master branch of David Miller's next networking tree. v2 [Yoshihiro Kaneko] * As suggested by Sergei Shtylyov remove re-formattings which is not related to the subject of this patch. drivers/net/ethernet/renesas/ravb_main.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index 238b56f..34066e0 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -246,10 +246,9 @@ static void ravb_ring_format(struct net_device *ndev, int q) for (i = 0; i < priv->num_rx_ring[q]; i++) { /* RX descriptor */ rx_desc = &priv->rx_ring[q][i]; - /* The size of the buffer should be on 16-byte boundary. */ - rx_desc->ds_cc = cpu_to_le16(ALIGN(PKT_BUF_SZ, 16)); + rx_desc->ds_cc = cpu_to_le16(PKT_BUF_SZ); dma_addr = dma_map_single(ndev->dev.parent, priv->rx_skb[q][i]->data, - ALIGN(PKT_BUF_SZ, 16), + PKT_BUF_SZ, DMA_FROM_DEVICE); /* We just set the data size to 0 for a failed mapping which * should prevent DMA from happening... @@ -558,7 +557,7 @@ static bool ravb_rx(struct net_device *ndev, int *quota, int q) skb = priv->rx_skb[q][entry]; priv->rx_skb[q][entry] = NULL; dma_unmap_single(ndev->dev.parent, le32_to_cpu(desc->dptr), - ALIGN(PKT_BUF_SZ, 16), + PKT_BUF_SZ, DMA_FROM_DEVICE); get_ts &= (q == RAVB_NC) ? RAVB_RXTSTAMP_TYPE_V2_L2_EVENT : @@ -588,8 +587,7 @@ static bool ravb_rx(struct net_device *ndev, int *quota, int q) for (; priv->cur_rx[q] - priv->dirty_rx[q] > 0; priv->dirty_rx[q]++) { entry = priv->dirty_rx[q] % priv->num_rx_ring[q]; desc = &priv->rx_ring[q][entry]; - /* The size of the buffer should be on 16-byte boundary. */ - desc->ds_cc = cpu_to_le16(ALIGN(PKT_BUF_SZ, 16)); + desc->ds_cc = cpu_to_le16(PKT_BUF_SZ); if (!priv->rx_skb[q][entry]) { skb = netdev_alloc_skb(ndev,