linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging/wilc1000: let wilc_mac_xmit() to NETDEV_TX_OK
@ 2020-06-28 18:32 Luc Van Oostenryck
  2020-06-29  7:58 ` Nicolas.Ferre
  0 siblings, 1 reply; 5+ messages in thread
From: Luc Van Oostenryck @ 2020-06-28 18:32 UTC (permalink / raw)
  To: Adham Abozaeid, Ajay Singh, Greg Kroah-Hartman
  Cc: linux-wireless, devel, linux-kernel, Luc Van Oostenryck

The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type defining 'NETDEV_TX_OK' but this
driver returns '0' instead of 'NETDEV_TX_OK'.

Fix this by returning ''NETDEV_TX_OK' instead of 0.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 drivers/staging/wilc1000/netdev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/netdev.c b/drivers/staging/wilc1000/netdev.c
index fda0ab97b02c..be3ae5486f44 100644
--- a/drivers/staging/wilc1000/netdev.c
+++ b/drivers/staging/wilc1000/netdev.c
@@ -678,14 +678,14 @@ netdev_tx_t 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;
@@ -710,7 +710,7 @@ netdev_tx_t wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev)
 		srcu_read_unlock(&wilc->srcu, srcu_idx);
 	}
 
-	return 0;
+	return NETDEV_TX_OK;
 }
 
 static int wilc_mac_close(struct net_device *ndev)
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging/wilc1000: let wilc_mac_xmit() to NETDEV_TX_OK
  2020-06-28 18:32 [PATCH] staging/wilc1000: let wilc_mac_xmit() to NETDEV_TX_OK Luc Van Oostenryck
@ 2020-06-29  7:58 ` Nicolas.Ferre
  2020-06-29 10:40   ` [PATCH] wilc1000: let wilc_mac_xmit() return NETDEV_TX_OK Luc Van Oostenryck
  2020-07-02  6:48   ` [PATCH] staging/wilc1000: let wilc_mac_xmit() to NETDEV_TX_OK Kalle Valo
  0 siblings, 2 replies; 5+ messages in thread
From: Nicolas.Ferre @ 2020-06-29  7:58 UTC (permalink / raw)
  To: luc.vanoostenryck, adham.abozaeid, Ajay.Kathat, gregkh, kvalo
  Cc: linux-wireless, devel, linux-kernel

Luc,

Thanks for your patch...

On 28/06/2020 at 20:32, Luc Van Oostenryck wrote:
> The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
> which is a typedef for an enum type defining 'NETDEV_TX_OK' but this
> driver returns '0' instead of 'NETDEV_TX_OK'.
> 
> Fix this by returning ''NETDEV_TX_OK' instead of 0.
> 
> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
> ---
>   drivers/staging/wilc1000/netdev.c | 6 +++---

... would it be possible that you re-spin it so that it applies to the 
new location of this driver:
drivers/net/wireless/microchip/wilc1000/netdev.c

You can rebase your patch on the wireless-driver-next tree with 
wilc1000-move-out-of-staging branch:

tree: 
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git
branch: wilc1000-move-out-of-staging

(Then you can also review the subject line of your patch, BTW)

Thanks for your help. Best regards,
   Nicolas

>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/wilc1000/netdev.c b/drivers/staging/wilc1000/netdev.c
> index fda0ab97b02c..be3ae5486f44 100644
> --- a/drivers/staging/wilc1000/netdev.c
> +++ b/drivers/staging/wilc1000/netdev.c
> @@ -678,14 +678,14 @@ netdev_tx_t 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;
> @@ -710,7 +710,7 @@ netdev_tx_t wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev)
>                  srcu_read_unlock(&wilc->srcu, srcu_idx);
>          }
> 
> -       return 0;
> +       return NETDEV_TX_OK;
>   }
> 
>   static int wilc_mac_close(struct net_device *ndev)
> --
> 2.27.0
> 


-- 
Nicolas Ferre

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] wilc1000: let wilc_mac_xmit() return NETDEV_TX_OK
  2020-06-29  7:58 ` Nicolas.Ferre
@ 2020-06-29 10:40   ` Luc Van Oostenryck
  2020-07-14 17:53     ` Kalle Valo
  2020-07-02  6:48   ` [PATCH] staging/wilc1000: let wilc_mac_xmit() to NETDEV_TX_OK Kalle Valo
  1 sibling, 1 reply; 5+ messages in thread
From: Luc Van Oostenryck @ 2020-06-29 10:40 UTC (permalink / raw)
  To: Nicolas Ferre, Adham Abozaeid, Ajay Singh
  Cc: linux-wireless, linux-kernel, Luc Van Oostenryck

The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type defining 'NETDEV_TX_OK' but this
driver returns '0' instead of 'NETDEV_TX_OK'.

Fix this by returning 'NETDEV_TX_OK' instead of '0'.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 drivers/net/wireless/microchip/wilc1000/netdev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/microchip/wilc1000/netdev.c b/drivers/net/wireless/microchip/wilc1000/netdev.c
index fda0ab97b02c..be3ae5486f44 100644
--- a/drivers/net/wireless/microchip/wilc1000/netdev.c
+++ b/drivers/net/wireless/microchip/wilc1000/netdev.c
@@ -678,14 +678,14 @@ netdev_tx_t 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;
@@ -710,7 +710,7 @@ netdev_tx_t wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev)
 		srcu_read_unlock(&wilc->srcu, srcu_idx);
 	}
 
-	return 0;
+	return NETDEV_TX_OK;
 }
 
 static int wilc_mac_close(struct net_device *ndev)
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging/wilc1000: let wilc_mac_xmit() to NETDEV_TX_OK
  2020-06-29  7:58 ` Nicolas.Ferre
  2020-06-29 10:40   ` [PATCH] wilc1000: let wilc_mac_xmit() return NETDEV_TX_OK Luc Van Oostenryck
@ 2020-07-02  6:48   ` Kalle Valo
  1 sibling, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2020-07-02  6:48 UTC (permalink / raw)
  To: Nicolas.Ferre
  Cc: luc.vanoostenryck, adham.abozaeid, Ajay.Kathat, gregkh,
	linux-wireless, devel, linux-kernel

<Nicolas.Ferre@microchip.com> writes:

> Luc,
>
> Thanks for your patch...
>
> On 28/06/2020 at 20:32, Luc Van Oostenryck wrote:
>> The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
>> which is a typedef for an enum type defining 'NETDEV_TX_OK' but this
>> driver returns '0' instead of 'NETDEV_TX_OK'.
>> 
>> Fix this by returning ''NETDEV_TX_OK' instead of 0.
>> 
>> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
>> ---
>>   drivers/staging/wilc1000/netdev.c | 6 +++---
>
> ... would it be possible that you re-spin it so that it applies to the 
> new location of this driver:
> drivers/net/wireless/microchip/wilc1000/netdev.c
>
> You can rebase your patch on the wireless-driver-next tree with 
> wilc1000-move-out-of-staging branch:
>
> tree: 
> git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git
> branch: wilc1000-move-out-of-staging
>
> (Then you can also review the subject line of your patch, BTW)

And also cc linux-wireless so that our patchwork sees it (not sure if
the original patch had it or not, just making sure), more info in the
link below.

-- 
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] wilc1000: let wilc_mac_xmit() return NETDEV_TX_OK
  2020-06-29 10:40   ` [PATCH] wilc1000: let wilc_mac_xmit() return NETDEV_TX_OK Luc Van Oostenryck
@ 2020-07-14 17:53     ` Kalle Valo
  0 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2020-07-14 17:53 UTC (permalink / raw)
  To: Luc Van Oostenryck
  Cc: Nicolas Ferre, Adham Abozaeid, Ajay Singh, linux-wireless,
	linux-kernel, Luc Van Oostenryck

Luc Van Oostenryck <luc.vanoostenryck@gmail.com> wrote:

> The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
> which is a typedef for an enum type defining 'NETDEV_TX_OK' but this
> driver returns '0' instead of 'NETDEV_TX_OK'.
> 
> Fix this by returning 'NETDEV_TX_OK' instead of '0'.
> 
> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>

Patch applied to wireless-drivers-next.git, thanks.

cce0e08301fe wilc1000: let wilc_mac_xmit() return NETDEV_TX_OK

-- 
https://patchwork.kernel.org/patch/11632291/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-07-14 17:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-28 18:32 [PATCH] staging/wilc1000: let wilc_mac_xmit() to NETDEV_TX_OK Luc Van Oostenryck
2020-06-29  7:58 ` Nicolas.Ferre
2020-06-29 10:40   ` [PATCH] wilc1000: let wilc_mac_xmit() return NETDEV_TX_OK Luc Van Oostenryck
2020-07-14 17:53     ` Kalle Valo
2020-07-02  6:48   ` [PATCH] staging/wilc1000: let wilc_mac_xmit() to NETDEV_TX_OK Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).