lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1435ae13-d0d0-61c6-c96d-18c8e68d086e@gmail.com>
Date:   Wed, 25 Apr 2018 18:40:14 +0200
From:   Janusz Lisiecki <janusz.lisiecki@...il.com>
To:     Luc Van Oostenryck <luc.vanoostenryck@...il.com>,
        linux-kernel@...r.kernel.org
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Tobin C. Harding" <me@...in.cc>,
        Quytelda Kahja <quytelda@...alin.org>,
        Sergio Paracuellos <sergio.paracuellos@...il.com>,
        SUNIL KALLUR RAMEGOWDA <kallur.sunil@...il.com>,
        "Gustavo A. R. Silva" <garsilva@...eddedor.com>,
        devel@...verdev.osuosl.org
Subject: Re: [PATCH] staging: ks7010: fix ks_wlan_start_xmit()'s return type

W dniu 2018-04-24 o 15:18, Luc Van Oostenryck pisze:
> 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.
>
> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@...il.com>
> ---
>   drivers/staging/ks7010/ks_wlan_net.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c
> index 9078e13b0..57412caac 100644
> --- a/drivers/staging/ks7010/ks_wlan_net.c
> +++ b/drivers/staging/ks7010/ks_wlan_net.c
> @@ -71,7 +71,7 @@ static const struct iw_handler_def ks_wlan_handler_def;
>    */
>   static int ks_wlan_open(struct net_device *dev);
>   static void ks_wlan_tx_timeout(struct net_device *dev);
> -static int ks_wlan_start_xmit(struct sk_buff *skb, struct net_device *dev);
> +static netdev_tx_t ks_wlan_start_xmit(struct sk_buff *skb, struct net_device *dev);
>   static int ks_wlan_close(struct net_device *dev);
>   static void ks_wlan_set_multicast_list(struct net_device *dev);
>   static struct net_device_stats *ks_wlan_get_stats(struct net_device *dev);
> @@ -2772,7 +2772,7 @@ void ks_wlan_tx_timeout(struct net_device *dev)
>   }
>   
>   static
> -int ks_wlan_start_xmit(struct sk_buff *skb, struct net_device *dev)
> +netdev_tx_t ks_wlan_start_xmit(struct sk_buff *skb, struct net_device *dev)
>   {
>   	struct ks_wlan_private *priv = netdev_priv(dev);
>   	int ret;
Maybe inside ks_wlan_start_xmit, instead of "return 0;", there should be 
"return NETDEV_TX_OK;" and "return NETDEV_TX_BUSY;" otherwise. It is 
just suggestion.

Br,
Janusz Lisiecki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ