From patchwork Thu Feb 9 14:24:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 93716 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp25943qgi; Thu, 9 Feb 2017 06:25:36 -0800 (PST) X-Received: by 10.99.115.71 with SMTP id d7mr4349086pgn.56.1486650336872; Thu, 09 Feb 2017 06:25:36 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b21si10178493pfc.225.2017.02.09.06.25.36; Thu, 09 Feb 2017 06:25:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753086AbdBIOZe (ORCPT + 25 others); Thu, 9 Feb 2017 09:25:34 -0500 Received: from mail-lf0-f45.google.com ([209.85.215.45]:34913 "EHLO mail-lf0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752785AbdBIOY7 (ORCPT ); Thu, 9 Feb 2017 09:24:59 -0500 Received: by mail-lf0-f45.google.com with SMTP id n124so3231365lfd.2 for ; Thu, 09 Feb 2017 06:24:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=cj80ndG/FeWaGtWlLEjfjgs+1WBWMnNhyB11MwxqfrQ=; b=Wy7ypUQlOY5ic+pczz0GrefIawMGR8DZnipGMDw3cFSgJ2zvQDjPXfzKzQObc1hV29 aZAv/j6xTLWvJTbD0ppiC0pdd5gSosDH0m/Niin3OWVzdjlPA+1Y7tj9nWsVl5P/tdX9 ozd9/GeL9lK43EOW99qpG7eIay4PRLoP5q5pM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=cj80ndG/FeWaGtWlLEjfjgs+1WBWMnNhyB11MwxqfrQ=; b=TmvKORXGaXgtWwVxwQb/t0+A+X+EfOnRISSFLn4QnWlAQy/9pJBpyLXA3D4Xl5ckOT SRzhvQpUZ1+nuXYHnutvzRzn1pLtP3QhNLx54UmtO80zOozKeqgwE8KSrSJXVlJ38jtF K8DITv8QG8waKGfoQMOidsRtZqKRERpqxDC838XgMzEiYk6ugoMK7pa7Fb7rJGZmSWxw xe6ftFmfStdr4W/JQqAFPSjlj6Gx1TbJ/ycb/TMR7+75BMtk88A2bDCklqbkpDUQQ7MH 3/eKWZO2lfJAqNZX7ona8BR6aCIa4Ejxz8fFIbLf9xzt5MU2aNWXa24DeC+qO5hjEVQN PBPQ== X-Gm-Message-State: AMke39kzsfSVYEbBsQRQy9mvXP+BrW2U7W3QgpTAMpKVLpWZBXLUTjk/jRg4ZbnqIunmrcBU X-Received: by 10.46.20.14 with SMTP id u14mr1281325ljd.30.1486650257532; Thu, 09 Feb 2017 06:24:17 -0800 (PST) Received: from khorivan.synapse.com ([2001:67c:2e5c:2011::caa1]) by smtp.gmail.com with ESMTPSA id e86sm3610901lji.32.2017.02.09.06.24.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Feb 2017 06:24:16 -0800 (PST) From: Ivan Khoronzhuk To: w-kwok2@ti.com, m-karicheri2@ti.com, netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Ivan Khoronzhuk Subject: [PATCH] net: ethernet: ti: netcp_core: return netdev_tx_t in xmit Date: Thu, 9 Feb 2017 16:24:14 +0200 Message-Id: <1486650254-8976-1-git-send-email-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The _xmit function should return netdev_tx_t type. Signed-off-by: Ivan Khoronzhuk --- Based on net-next/master drivers/net/ethernet/ti/netcp_core.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -- 2.7.4 diff --git a/drivers/net/ethernet/ti/netcp_core.c b/drivers/net/ethernet/ti/netcp_core.c index 7c7ae08..5845ad8 100644 --- a/drivers/net/ethernet/ti/netcp_core.c +++ b/drivers/net/ethernet/ti/netcp_core.c @@ -1280,7 +1280,8 @@ static int netcp_tx_submit_skb(struct netcp_intf *netcp, } /* Submit the packet */ -static int netcp_ndo_start_xmit(struct sk_buff *skb, struct net_device *ndev) +static netdev_tx_t netcp_ndo_start_xmit(struct sk_buff *skb, + struct net_device *ndev) { struct netcp_intf *netcp = netdev_priv(ndev); struct netcp_stats *tx_stats = &netcp->stats; @@ -1300,7 +1301,7 @@ static int netcp_ndo_start_xmit(struct sk_buff *skb, struct net_device *ndev) dev_warn(netcp->ndev_dev, "padding failed (%d), packet dropped\n", ret); tx_stats->tx_dropped++; - return ret; + return NETDEV_TX_BUSY; } skb->len = NETCP_MIN_PACKET_SIZE; } @@ -1329,7 +1330,7 @@ static int netcp_ndo_start_xmit(struct sk_buff *skb, struct net_device *ndev) if (desc) netcp_free_tx_desc_chain(netcp, desc, sizeof(*desc)); dev_kfree_skb(skb); - return ret; + return NETDEV_TX_BUSY; } int netcp_txpipe_close(struct netcp_tx_pipe *tx_pipe)