Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4828101imm; Mon, 17 Sep 2018 23:11:37 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbBoU2/DxjdDOnzWvW6piOU4JqZ/ARsix/Bsk+ZiJ3/eiTTHCZs2ZJZpbdZxukpGIg1VyE6 X-Received: by 2002:a17:902:b7c5:: with SMTP id v5-v6mr28279292plz.49.1537251097424; Mon, 17 Sep 2018 23:11:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537251097; cv=none; d=google.com; s=arc-20160816; b=oA7Y8pehIqr5AMa9bfq5nz3GjxufaeyCjbiyapIYmYIea4o4WA28x3U673AZVLjrEu p+9ZpbdFIIX0gZ9qr0h58rCLbJnbx5VOFfrlelY0dNLCDg5UUVvTizzCYx2zchJyGOai IEFZjYLoV9usbIoy+L4Y0CYYyUEs9TsN4RttPCVKFjUlMd6FSeqf1dXZLUbCk2e5zJQd X5mP73QXpNTRnBt1b+NATbM3ILSioRncZtOm/bZRA87+F2qj+0AoqNhNJQ+HYOTq8Bil j4XRrIwS2+hZ1ZQy0GvgbVrtBS2/xWT0gEH9I60mdj67K5MzHR3ANwU9tsaeT7Zcek2V Pfxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=8zjLWe5IRspYVkwWY6JOKo8cNCxc+CQkUxZBXotBNMw=; b=sNSuMH5DhrDViHs+78qw51zdcQsucXQ2Jk0L5dTKq6fHoLstLXtIFLgZKZ1qqwmBNP iwfOI5abe1UUgxnKeSNhygsG6s0Df3V4Se199j07jtiFfuzr+ItVsHy40VSZMD4kclRn n4/Os19xSXJXhazAwumRILTxjopnmJVZJmqB0oB1YGZ+fcl67MHcwQ5by4pE2AjcR2JS d2BEjUZG29amfgXBCDoWEQfQ44u/a0Qz7yRW+BWSU/dbfWag9oIbHld6RoHyOOvpMfhP m4DR/EE5ijsUQNyN0U7vFlBRfHZBvZnxuXjSAwQSAWtJZsHHhd3JiHLVVNfol9jnMfno j0RA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h89-v6si17378805pld.517.2018.09.17.23.11.21; Mon, 17 Sep 2018 23:11:37 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727563AbeIRLmQ (ORCPT + 99 others); Tue, 18 Sep 2018 07:42:16 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:44599 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726275AbeIRLmP (ORCPT ); Tue, 18 Sep 2018 07:42:15 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id AE4ED1AFD3EE7; Tue, 18 Sep 2018 14:11:08 +0800 (CST) Received: from localhost (10.177.31.96) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.399.0; Tue, 18 Sep 2018 14:11:01 +0800 From: YueHaibing To: , , CC: , , YueHaibing Subject: [PATCH net-next] net: hns3: fix return type of ndo_start_xmit function Date: Tue, 18 Sep 2018 14:09:43 +0800 Message-ID: <20180918060943.25208-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.177.31.96] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, also the implementation in this driver has returns 'netdev_tx_t' value, so just change the function return type to netdev_tx_t. Found by coccinelle. Signed-off-by: YueHaibing --- drivers/net/ethernet/hisilicon/hip04_eth.c | 3 ++- drivers/net/ethernet/hisilicon/hix5hd2_gmac.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c b/drivers/net/ethernet/hisilicon/hip04_eth.c index 14374a8..be268dc 100644 --- a/drivers/net/ethernet/hisilicon/hip04_eth.c +++ b/drivers/net/ethernet/hisilicon/hip04_eth.c @@ -422,7 +422,8 @@ static void hip04_start_tx_timer(struct hip04_priv *priv) ns, HRTIMER_MODE_REL); } -static int hip04_mac_start_xmit(struct sk_buff *skb, struct net_device *ndev) +static netdev_tx_t +hip04_mac_start_xmit(struct sk_buff *skb, struct net_device *ndev) { struct hip04_priv *priv = netdev_priv(ndev); struct net_device_stats *stats = &ndev->stats; diff --git a/drivers/net/ethernet/hisilicon/hix5hd2_gmac.c b/drivers/net/ethernet/hisilicon/hix5hd2_gmac.c index c572700..471805e 100644 --- a/drivers/net/ethernet/hisilicon/hix5hd2_gmac.c +++ b/drivers/net/ethernet/hisilicon/hix5hd2_gmac.c @@ -736,7 +736,7 @@ static int hix5hd2_fill_sg_desc(struct hix5hd2_priv *priv, return 0; } -static int hix5hd2_net_xmit(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t hix5hd2_net_xmit(struct sk_buff *skb, struct net_device *dev) { struct hix5hd2_priv *priv = netdev_priv(dev); struct hix5hd2_desc *desc; -- 1.8.3.1