From patchwork Thu Apr 26 20:54:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luc Van Oostenryck X-Patchwork-Id: 10366809 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E238D60225 for ; Thu, 26 Apr 2018 20:54:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CD5EF2927A for ; Thu, 26 Apr 2018 20:54:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C054D2927C; Thu, 26 Apr 2018 20:54:42 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, 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 6549F2927A for ; Thu, 26 Apr 2018 20:54:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752000AbeDZUyk (ORCPT ); Thu, 26 Apr 2018 16:54:40 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:54952 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751496AbeDZUyj (ORCPT ); Thu, 26 Apr 2018 16:54:39 -0400 Received: by mail-wm0-f67.google.com with SMTP id f6so85947wmc.4 for ; Thu, 26 Apr 2018 13:54:38 -0700 (PDT) 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=f5tU7lpT4E544KbVhBOJQrrHvFPFy0BfyyCnfuf1f6U=; b=cMlp89hDTftC6CgVGzvser1AzI4YqM2v8OrQECeJgNjYA76x3dMI5757604GU69aHN IolqXyXCzXQk6pCOu/gxgZic4JwMFA6AQ3rvPRyMp5IvajNN9ZKFQHi2cKBV261rEESD I8/blVwcoOmxAR0+HaQphuyffk+XbqnUwtXA/9sGsRKI/ML1n1OOSgXrMiKgkOmM5zOk TQx8rAokkc6PGjGbl8MVWtFKXNNw/FHQ0tH9GHcCU3Z7GoHXn0t+cD5YFwxL0RuI2AhQ 97S6gfDc242TYgqgDnKygpmMHm4qjtyeZHEJRGsLSTu1U891o6bay8ZgIFV/mEDhX58b n+rQ== 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=f5tU7lpT4E544KbVhBOJQrrHvFPFy0BfyyCnfuf1f6U=; b=T47I927q5U3G4nt0FVmDNHOhBrACwcZ3dloJ+qW/8oDAZHBjR4PUb8xnKWwVsKVbTm vtn61U97xHB1ffcrPB9nOujlB0Q/MxcxsjnnTplgc/4KNqkvLfF6Vhph4SUCFTpR9cTu TSm/H3UTbU/123Ver3raUA1gtHQTG2uMi8NrUn2I6flYtSIDI4Aa6vOhpJJdNRugyE/r RI3Jb+Q4k6d8e7tUxvTEuumH3UXJEtV6Lg2TAaQqddmjrSF+b0Jim5l/Ddp6NkzfEEQ8 Uw0PD9ubSol2Sn4KUJwlAxoU8TQwI0U8+nABJzlxo3g18BZEAAilmIszdJFJPuQ3VJMc wSFg== X-Gm-Message-State: ALQs6tDBRTgzz/k6hShpX6XwS40AdtD9TvNMn+fZ76k7Na7+2kf16I2g 3ppvjHUrXYJZ+8jPzaezqIjzxQSK X-Google-Smtp-Source: AB8JxZqHoeOr9w616wMS579hdw/GSfsXHF20hayw6tGAFiXLTiv549lbSEqlBn14FDXZZWcJK2Kbcg== X-Received: by 2002:aa7:d5d1:: with SMTP id d17-v6mr75273eds.312.1524776078087; Thu, 26 Apr 2018 13:54:38 -0700 (PDT) Received: from localhost.localdomain ([2a02:a03f:40e7:cd00:c47a:3b0c:1c8:90dc]) by smtp.gmail.com with ESMTPSA id v17-v6sm16668edl.47.2018.04.26.13.54.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Apr 2018 13:54:37 -0700 (PDT) From: Luc Van Oostenryck To: Claudiu Beznea Cc: Aditya Shankar , Ganesh Krishna , Greg Kroah-Hartman , devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org, Luc Van Oostenryck Subject: [PATCH v2] staging/wilc1000: fix wilc_mac_xmit()'s return type Date: Thu, 26 Apr 2018 22:54:33 +0200 Message-Id: <20180426205433.30308-1-luc.vanoostenryck@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <3c4bbd52-5af9-72b9-732b-f83f0bd23905@microchip.com> References: <3c4bbd52-5af9-72b9-732b-f83f0bd23905@microchip.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@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, but the implementation in this driver returns an 'int'. Fix this by returning 'netdev_tx_t' in this driver too and accordingly change 'return 0;' by 'return NETDEV_TX_OK;' Signed-off-by: Luc Van Oostenryck Reviewed-by: Claudiu Beznea --- drivers/staging/wilc1000/linux_wlan.c | 8 ++++---- drivers/staging/wilc1000/wilc_wlan.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 38a83bd31..d95b9750b 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -941,7 +941,7 @@ static void linux_wlan_tx_complete(void *priv, int status) kfree(pv_data); } -int wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev) +netdev_tx_t wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev) { struct wilc_vif *vif; struct tx_complete_data *tx_data = NULL; @@ -956,14 +956,14 @@ int wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev) if (skb->dev != ndev) { netdev_err(ndev, "Packet not destined to this device\n"); - return 0; + return NETDEV_TX_OK; } tx_data = kmalloc(sizeof(*tx_data), GFP_ATOMIC); if (!tx_data) { dev_kfree_skb(skb); netif_wake_queue(ndev); - return 0; + return NETDEV_TX_OK; } tx_data->buff = skb->data; @@ -994,7 +994,7 @@ int wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev) netif_stop_queue(wilc->vif[1]->ndev); } - return 0; + return NETDEV_TX_OK; } static int wilc_mac_close(struct net_device *ndev) diff --git a/drivers/staging/wilc1000/wilc_wlan.h b/drivers/staging/wilc1000/wilc_wlan.h index fa157a67b..d3b5a6b38 100644 --- a/drivers/staging/wilc1000/wilc_wlan.h +++ b/drivers/staging/wilc1000/wilc_wlan.h @@ -298,7 +298,7 @@ void wilc_chip_sleep_manually(struct wilc *wilc); void wilc_enable_tcp_ack_filter(bool value); int wilc_wlan_get_num_conn_ifcs(struct wilc *wilc); -int wilc_mac_xmit(struct sk_buff *skb, struct net_device *dev); +netdev_tx_t wilc_mac_xmit(struct sk_buff *skb, struct net_device *dev); void WILC_WFI_p2p_rx(struct net_device *dev, u8 *buff, u32 size); void host_wakeup_notify(struct wilc *wilc);