From patchwork Thu Sep 20 12:32:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10607653 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A7DE76CB for ; Thu, 20 Sep 2018 12:50:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9802F2D448 for ; Thu, 20 Sep 2018 12:50:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8AFD22D461; Thu, 20 Sep 2018 12:50:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2FF052D450 for ; Thu, 20 Sep 2018 12:50:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388298AbeITScK (ORCPT ); Thu, 20 Sep 2018 14:32:10 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:12647 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387764AbeITScJ (ORCPT ); Thu, 20 Sep 2018 14:32:09 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 29139C8200FF3; Thu, 20 Sep 2018 20:48:45 +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; Thu, 20 Sep 2018 20:48:38 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , , , , , YueHaibing Subject: [PATCH net-next 15/22] net: hamradio: fix return type of ndo_start_xmit function Date: Thu, 20 Sep 2018 20:32:59 +0800 Message-ID: <20180920123306.14772-16-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 In-Reply-To: <20180920123306.14772-1-yuehaibing@huawei.com> References: <20180920123306.14772-1-yuehaibing@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.31.96] X-CFilter-Loop: Reflected Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t. Found by coccinelle. Signed-off-by: YueHaibing --- drivers/net/hamradio/baycom_epp.c | 3 ++- drivers/net/hamradio/dmascc.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/hamradio/baycom_epp.c b/drivers/net/hamradio/baycom_epp.c index 1e62d00..f4ceccf 100644 --- a/drivers/net/hamradio/baycom_epp.c +++ b/drivers/net/hamradio/baycom_epp.c @@ -772,7 +772,8 @@ static void epp_bh(struct work_struct *work) * ===================== network driver interface ========================= */ -static int baycom_send_packet(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t +baycom_send_packet(struct sk_buff *skb, struct net_device *dev) { struct baycom_state *bc = netdev_priv(dev); diff --git a/drivers/net/hamradio/dmascc.c b/drivers/net/hamradio/dmascc.c index cde4120..2798870 100644 --- a/drivers/net/hamradio/dmascc.c +++ b/drivers/net/hamradio/dmascc.c @@ -239,7 +239,7 @@ struct scc_info { static int scc_open(struct net_device *dev); static int scc_close(struct net_device *dev); static int scc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd); -static int scc_send_packet(struct sk_buff *skb, struct net_device *dev); +static netdev_tx_t scc_send_packet(struct sk_buff *skb, struct net_device *dev); static int scc_set_mac_address(struct net_device *dev, void *sa); static inline void tx_on(struct scc_priv *priv); @@ -921,7 +921,7 @@ static int scc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) } -static int scc_send_packet(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t scc_send_packet(struct sk_buff *skb, struct net_device *dev) { struct scc_priv *priv = dev->ml_priv; unsigned long flags;