From patchwork Wed Dec 5 18:55:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 1008394 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="lA/FoYfC"; dkim-atps=neutral Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4397Mc0gk4z9s8J for ; Thu, 6 Dec 2018 05:59:56 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 4CEDDBA2; Wed, 5 Dec 2018 18:56:07 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id AFAEFB7D for ; Wed, 5 Dec 2018 18:56:05 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 476D3830 for ; Wed, 5 Dec 2018 18:56:05 +0000 (UTC) Received: by mail-pg1-f193.google.com with SMTP id n2so9435286pgm.3 for ; Wed, 05 Dec 2018 10:56:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=IAN63j53gCicXE89t2Bi7skoyOdghOhvRoDHGU0HeUc=; b=lA/FoYfCucZWchE6kgrnfvX82Ro3yZ72HzC3zA72Y2uIk4RsshplGYHemKHK4KLJCY uO2n5f+dZs1927it/bfR7GdyFPkO2YOoM8DXWspjL7yV1axQ0D9z2/FR3sLhganrQz3I rHcth9HrVKAlVAuypi7E8JyJBJZJ5m3PItUpnKr8uVIUsEVpbH1RIrLJLnB2llEMNiAW W8/uIvbN4v9wuDx7zFpTjWipo1orFtMhrSyQaUqMzZTXEK5SDlIDDs66P1qKHJLdHvgj TmnmlNlHLXGBlrFadwM0y/1w1bY+RspFIEaZBp+R4tKzEsBQUgo/ZJoO30mXI1hpGGe4 RS/A== 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:in-reply-to :references; bh=IAN63j53gCicXE89t2Bi7skoyOdghOhvRoDHGU0HeUc=; b=hL9w3BqLzd5N5vJxMZjK6aR+1nHe7A/XNlG/g2lhYjPkCnYn+P0laj8qg4OO6YRlHN lRshZaV8w6TmSyv9mW6UeSy0BUYxk7OVOQAqJ91qzWHJH4q4PJCSdK58agYiGDKozEZJ yOXntVTSuODoivMTCkHW78POh9S6F54/opJC33xEZj3aLkwH3lgyONdwGF1eWMAiRjjB bvFBeDdIizlFB/5UE1a09wnEfIlXHnAuhfmcx8VYEJ5iHm5WRbLYgYrsANal40k+JjlC PLcsHlBIXWAAR7ECpk8plWefmd3uGymT+7eX/qI+KbHtfzw6X4Ps4PUAwOUN3MXaFW5s o90A== X-Gm-Message-State: AA+aEWYZod/exZCl/TNIoZXlOcTm33gKubU/2wzqSaEbMkMYVMeGWOUe 6cT8CrUDJ2/XRAHjRLdrdr0q9ZpR X-Google-Smtp-Source: AFSGD/XwzBXZeU1JOXdWgR2gjVhYgdXLiGi+aZSjQaPgvD1k2DBLH7/OQF/tIimHmxD0CdfeSCa6iQ== X-Received: by 2002:a63:790e:: with SMTP id u14mr20168879pgc.452.1544036164463; Wed, 05 Dec 2018 10:56:04 -0800 (PST) Received: from gizo.domain (97-115-96-17.ptld.qwest.net. [97.115.96.17]) by smtp.gmail.com with ESMTPSA id q187sm93627156pfq.128.2018.12.05.10.56.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Dec 2018 10:56:03 -0800 (PST) From: Greg Rose To: dev@openvswitch.org Date: Wed, 5 Dec 2018 10:55:50 -0800 Message-Id: <1544036152-27247-7-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1544036152-27247-1-git-send-email-gvrose8192@gmail.com> References: <1544036152-27247-1-git-send-email-gvrose8192@gmail.com> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: YueHaibing Subject: [ovs-dev] [PATCH 6/8] datapath: fix return type of ndo_start_xmit function X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org From: YueHaibing Upstream commit: commit eddf11e18dff0e8671e06ce54e64cfc843303ab9 Author: YueHaibing Date: Wed Sep 26 17:15:38 2018 +0800 net: ovs: fix return type of ndo_start_xmit function 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 Signed-off-by: David S. Miller CC: YueHaibing Signed-off-by: Greg Rose Acked-by: William Tu --- datapath/vport-internal_dev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/datapath/vport-internal_dev.c b/datapath/vport-internal_dev.c index 629965e..0318f58 100644 --- a/datapath/vport-internal_dev.c +++ b/datapath/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)