From patchwork Thu Sep 20 12:32:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10607733 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 F3798112B for ; Thu, 20 Sep 2018 13:07:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DDE502D57C for ; Thu, 20 Sep 2018 13:07:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DB1662D558; Thu, 20 Sep 2018 13:07:24 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6E7162D597 for ; Thu, 20 Sep 2018 13:07:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RNG4S2uUrtxCC/Jj+kSBQ32L4Rbet2YDgwuaZfs0aNk=; b=nXRI+3jDLu8ASn d/b4wbj8ouXHrB9RvkBOOo9DSVfj9qPDD2SaY45A7cQb+aHiN7jnesW9HZAZlSJkNIoYN8xqJ/Whn iJrhCDDsCUo0m5lDe58JAli5InafQw0W39ND/e0k/1XIuHI1dQRhLozRxQAhe87VS8vVxBA+v6sl7 u+yXmazFl+nLVbTX6G0w06FyNblUBGdMTJcWLY4AhCd11fP8hF4mWz+2tm1K/4F+AqzKLiyYwOrBP Sf69EGNb5T6FIJGj9yTCZ4NhdyhZIXCyel+MlWyjrxd3BusTkr7ywkFPMv4iQryOWqTN8jFQboX0G y9iOXwtH0GTXSV6kJBPw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g2yfn-0000ZH-3B; Thu, 20 Sep 2018 13:07:11 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g2ybd-0005tX-Hk for linux-arm-kernel@bombadil.infradead.org; Thu, 20 Sep 2018 13:02:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=qbOrxPkwuCtsJANw1Ie9O0nHgVbfR7NfdAnfaTEqdDA=; b=LsWQ1RcJoN5lXzBuxgzJjq+Ox hbcTp81oyrJ1vkcrkaj986h26bvoqoxvG1uvVurduECz4HPj5fCjs9nE27BMtm/8ucpuwL6zfWfWc x2Z7walEn4+EcL86XkUzdmfH5yEblJMQV+XqpUckBg/oQt63OAImI+Z+g5ZpV/lYKR/cz0O7LkxXA cuA33JE8WPdnQLMGm4jDOMlcPp4FAlKcjQLIdxTN/8/ZE9xysZtqMKSfTsk4g7ldma4xehxkrIQB2 o3regYjT4E5rPobHiCRpOXF3JxQAAgA+SEU0jFY8Xwk6DnF43hsKAo8AWltMLCyY12meH4hQFNCKO 4Re0Pk0Ug==; Received: from szxga04-in.huawei.com ([45.249.212.190] helo=huawei.com) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g2yNt-0003Dg-NZ for linux-arm-kernel@lists.infradead.org; Thu, 20 Sep 2018 12:48:43 +0000 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 75433C2709B1D; Thu, 20 Sep 2018 20:48:36 +0800 (CST) Received: from localhost (10.177.31.96) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.399.0; Thu, 20 Sep 2018 20:48:29 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH net-next 12/22] net: ovs: fix return type of ndo_start_xmit function Date: Thu, 20 Sep 2018 20:32:56 +0800 Message-ID: <20180920123306.14772-13-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180920_134842_231697_45CDCC10 X-CRM114-Status: GOOD ( 11.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dev@openvswitch.org, linux-mips@linux-mips.org, xen-devel@lists.xenproject.org, netdev@vger.kernel.org, linux-usb@vger.kernel.org, YueHaibing , linux-kernel@vger.kernel.org, linux-can@vger.kernel.org, devel@linuxdriverproject.org, linux-hams@vger.kernel.org, linux-omap@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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 --- net/openvswitch/vport-internal_dev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/openvswitch/vport-internal_dev.c b/net/openvswitch/vport-internal_dev.c index bb95c43..26f71cb 100644 --- a/net/openvswitch/vport-internal_dev.c +++ b/net/openvswitch/vport-internal_dev.c @@ -43,7 +43,8 @@ static struct internal_dev *internal_dev_priv(struct net_device *netdev) } /* Called with rcu_read_lock_bh. */ -static int internal_dev_xmit(struct sk_buff *skb, struct net_device *netdev) +static netdev_tx_t +internal_dev_xmit(struct sk_buff *skb, struct net_device *netdev) { int len, err; @@ -62,7 +63,7 @@ static int internal_dev_xmit(struct sk_buff *skb, struct net_device *netdev) } else { netdev->stats.tx_errors++; } - return 0; + return NETDEV_TX_OK; } static int internal_dev_open(struct net_device *netdev)