Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1962553imm; Thu, 20 Sep 2018 05:48:37 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaJQ7Pl+AJ2h7FMofaAmz1ucRFbvQxGJ7WcpYvSRuA4xvWvT7tfqAkH0rP/nuvrAs+gDKeX X-Received: by 2002:a62:591a:: with SMTP id n26-v6mr41286242pfb.94.1537447717775; Thu, 20 Sep 2018 05:48:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537447717; cv=none; d=google.com; s=arc-20160816; b=CYpfG8cu90xNkIeF9TfI0CHW4nna9NqwxDzHflyAQdTIQzp/s8NyLEY/aTbh8p2h7j QbhrmuI46ZwOg6v/QcyvQuz5r5hg5LM9CEl4nPK+gqzNa3cFTrUsx85qkdw3Uy9Mp8Tc 9LhqPjDmAbEHz3s4VkAYZuGHm5EvcAHORuckVCWKtR04TSygdduXLv9i9iTEZ2QjHlbt 0Azkdi0wmg6crKEKeydlWCUq8Yd/04++kxiNO1mgmoPX9O+iT9Z3afhVZQfVkdWnOZRe KQJPchDJNpa3tbPm9ENnPrTMsfC6kaqQNeviT7xqbCxJBXR+zYmo58DqaYa3pOgEngh0 csiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=dQD38jeKWFGwBSfPOJio0dfgtjyBiqD17hrRWbLBuRM=; b=wI7qJmY8h/XN39nvf6HYhhc4SVc70Yk7yGtE7KLcN5wZbHlD8iw76q6d11CeeA34U+ V6Wxf6AlXd8sLLvKZocrVTQ0ScvWRHFf7ZOXmteuo0QL/cJt2LDf6mTQYkv2NjX22myB eXdbdewa3TaL0kGo3G+a6l6L5urdvG0lrsCO7kkAW/kOj5ViDf6x3VnzZx85RfOKa3Vg V8uZ+K9meAIdo8PC1FaKCp0zFdLK+YWWNrcaC1gojFDPTNPyOKsKyQOehqepCs+8oPnP 9llAYr4DTXZUCvi/NMvBfrqT2qduUXJNS3U+FR6fntCgjMkld3BRkoZfS6EHKw9KnpY6 MAMQ== 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 l12-v6si5508499pgj.76.2018.09.20.05.48.21; Thu, 20 Sep 2018 05:48: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 S2387906AbeITSb1 (ORCPT + 99 others); Thu, 20 Sep 2018 14:31:27 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:58613 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387616AbeITSb0 (ORCPT ); Thu, 20 Sep 2018 14:31:26 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 71865A5439B97; Thu, 20 Sep 2018 20:48:02 +0800 (CST) Received: from localhost (10.177.31.96) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.399.0; Thu, 20 Sep 2018 20:47:56 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , , , , , YueHaibing Subject: [PATCH net-next 01/22] net: micrel: fix return type of ndo_start_xmit function Date: Thu, 20 Sep 2018 20:32:45 +0800 Message-ID: <20180920123306.14772-2-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 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, 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/ethernet/micrel/ks8695net.c | 2 +- drivers/net/ethernet/micrel/ks8851_mll.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/micrel/ks8695net.c b/drivers/net/ethernet/micrel/ks8695net.c index bd51e05..b881f5d 100644 --- a/drivers/net/ethernet/micrel/ks8695net.c +++ b/drivers/net/ethernet/micrel/ks8695net.c @@ -1164,7 +1164,7 @@ static int ks8695_poll(struct napi_struct *napi, int budget) * sk_buff and adds it to the TX ring. It then kicks the TX DMA * engine to ensure transmission begins. */ -static int +static netdev_tx_t ks8695_start_xmit(struct sk_buff *skb, struct net_device *ndev) { struct ks8695_priv *ksp = netdev_priv(ndev); diff --git a/drivers/net/ethernet/micrel/ks8851_mll.c b/drivers/net/ethernet/micrel/ks8851_mll.c index 0e9719f..35f8c9e 100644 --- a/drivers/net/ethernet/micrel/ks8851_mll.c +++ b/drivers/net/ethernet/micrel/ks8851_mll.c @@ -1021,9 +1021,9 @@ static void ks_write_qmu(struct ks_net *ks, u8 *pdata, u16 len) * spin_lock_irqsave is required because tx and rx should be mutual exclusive. * So while tx is in-progress, prevent IRQ interrupt from happenning. */ -static int ks_start_xmit(struct sk_buff *skb, struct net_device *netdev) +static netdev_tx_t ks_start_xmit(struct sk_buff *skb, struct net_device *netdev) { - int retv = NETDEV_TX_OK; + netdev_tx_t retv = NETDEV_TX_OK; struct ks_net *ks = netdev_priv(netdev); disable_irq(netdev->irq); -- 1.8.3.1