From patchwork Fri Feb 14 00:05:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 3648271 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 7AD0C9F334 for ; Thu, 13 Feb 2014 23:05:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8ECBC20154 for ; Thu, 13 Feb 2014 23:05:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7AF3B20145 for ; Thu, 13 Feb 2014 23:05:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751808AbaBMXFl (ORCPT ); Thu, 13 Feb 2014 18:05:41 -0500 Received: from mail-la0-f41.google.com ([209.85.215.41]:50876 "EHLO mail-la0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751795AbaBMXFk (ORCPT ); Thu, 13 Feb 2014 18:05:40 -0500 Received: by mail-la0-f41.google.com with SMTP id mc6so8931480lab.28 for ; Thu, 13 Feb 2014 15:05:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:subject:cc:from:organization:date :mime-version:content-type:content-transfer-encoding:message-id; bh=cK41S/kgEJk6X6VOzaSKrOKIwi4i0TO39GaCYCOuvSw=; b=SKMRrBd6bGrBYLbPpzHGke46Y/s3hkda5prkw7JgGqLBP7vRMG+TMazXDc5N6pkhBF KTm4NUbK8XC/qNkDxaUj+rXPxlUOrzsbiqA9/MdtpJ7ZsWLvo411Syj8avVrsqRtwokv 0RY5gL12HSBsdfEP+5Qv7y6B4u7nTAzITZ+DaZg9CVgGzu5MACUxobEOToSb/V3RcsAO 85Cc69Bp4qszSlfuf/V0/bGwBVvR+/ZsiICjJZP9TI55e4oGDPs6hKFlyeX97hWiQU0s lTFTYDDhxQll+rHekiE+w/XQ9YuPl3PsmDsh9GzuK8KeWaqgvbq9roGB7uxRwmLR6vOZ aGAQ== X-Gm-Message-State: ALoCoQnlgQHpO6K/sLo9tx6USNo1VOxOTFj5pqCH6VQ+IF1by4Omj8IISIuZvm0vtHc+Jcp/xrOk X-Received: by 10.152.180.4 with SMTP id dk4mr2552266lac.49.1392332738846; Thu, 13 Feb 2014 15:05:38 -0800 (PST) Received: from wasted.cogentembedded.com (ppp85-140-143-93.pppoe.mtu-net.ru. [85.140.143.93]) by mx.google.com with ESMTPSA id dm8sm5081987lad.7.2014.02.13.15.05.38 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 13 Feb 2014 15:05:38 -0800 (PST) To: netdev@vger.kernel.org Subject: [PATCH] sh_eth: use ETH_ZLEN instead of home-grown #define Cc: linux-sh@vger.kernel.org From: Sergei Shtylyov Organization: Cogent Embedded Date: Fri, 14 Feb 2014 03:05:42 +0300 MIME-Version: 1.0 Message-Id: <201402140305.42833.sergei.shtylyov@cogentembedded.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.5 required=5.0 tests=BAYES_00, 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 The driver #define's and uses ETHERSMALL macro for the minimum Ethernet frame size for which we have a standard macro ETH_ZLEN. Use the latter instead of the home-grown one. Signed-off-by: Sergei Shtylyov --- The patch is against DaveM's 'net-next.git' repo. drivers/net/ethernet/renesas/sh_eth.c | 4 ++-- drivers/net/ethernet/renesas/sh_eth.h | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: net-next/drivers/net/ethernet/renesas/sh_eth.c =================================================================== --- net-next.orig/drivers/net/ethernet/renesas/sh_eth.c +++ net-next/drivers/net/ethernet/renesas/sh_eth.c @@ -2098,8 +2098,8 @@ static int sh_eth_start_xmit(struct sk_b skb->len + 2); txdesc->addr = dma_map_single(&ndev->dev, skb->data, skb->len, DMA_TO_DEVICE); - if (skb->len < ETHERSMALL) - txdesc->buffer_length = ETHERSMALL; + if (skb->len < ETH_ZLEN) + txdesc->buffer_length = ETH_ZLEN; else txdesc->buffer_length = skb->len; Index: net-next/drivers/net/ethernet/renesas/sh_eth.h =================================================================== --- net-next.orig/drivers/net/ethernet/renesas/sh_eth.h +++ net-next/drivers/net/ethernet/renesas/sh_eth.h @@ -27,8 +27,7 @@ #define RX_RING_MIN 64 #define TX_RING_MAX 1024 #define RX_RING_MAX 1024 -#define ETHERSMALL 60 -#define PKT_BUF_SZ 1538 +#define PKT_BUF_SZ 1538 #define SH_ETH_TSU_TIMEOUT_MS 500 #define SH_ETH_TSU_CAM_ENTRIES 32