All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: ks7010: fix ks_wlan_start_xmit()'s return type
@ 2018-04-24 13:18 Luc Van Oostenryck
  2018-04-25 13:50 ` Greg Kroah-Hartman
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Luc Van Oostenryck @ 2018-04-24 13:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: devel, Greg Kroah-Hartman, Janusz Lisiecki,
	SUNIL KALLUR RAMEGOWDA, Sergio Paracuellos, Gustavo A. R. Silva,
	Quytelda Kahja, Luc Van Oostenryck

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@gmail.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;
-- 
2.17.0

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH] staging: ks7010: fix ks_wlan_start_xmit()'s return type
  2018-04-24 13:18 [PATCH] staging: ks7010: fix ks_wlan_start_xmit()'s return type Luc Van Oostenryck
@ 2018-04-25 13:50 ` Greg Kroah-Hartman
  2018-04-25 16:40 ` Janusz Lisiecki
  2018-04-25 16:44 ` Janusz Lisiecki
  2 siblings, 0 replies; 7+ messages in thread
From: Greg Kroah-Hartman @ 2018-04-25 13:50 UTC (permalink / raw)
  To: Luc Van Oostenryck
  Cc: devel, Janusz Lisiecki, linux-kernel, Sergio Paracuellos,
	Gustavo A. R. Silva, Quytelda Kahja, SUNIL KALLUR RAMEGOWDA

On Tue, Apr 24, 2018 at 03:18:21PM +0200, 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, 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@gmail.com>
> ---
>  drivers/staging/ks7010/ks_wlan_net.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Patch does not apply to my tree, please rebase and resend.

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH] staging: ks7010: fix ks_wlan_start_xmit()'s return type
  2018-04-24 13:18 [PATCH] staging: ks7010: fix ks_wlan_start_xmit()'s return type Luc Van Oostenryck
  2018-04-25 13:50 ` Greg Kroah-Hartman
@ 2018-04-25 16:40 ` Janusz Lisiecki
  2018-04-25 16:44 ` Janusz Lisiecki
  2 siblings, 0 replies; 7+ messages in thread
From: Janusz Lisiecki @ 2018-04-25 16:40 UTC (permalink / raw)
  To: Luc Van Oostenryck, linux-kernel
  Cc: devel, Greg Kroah-Hartman, Sergio Paracuellos,
	Gustavo A. R. Silva, Quytelda Kahja, SUNIL KALLUR RAMEGOWDA

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@gmail.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

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH] staging: ks7010: fix ks_wlan_start_xmit()'s return type
  2018-04-24 13:18 [PATCH] staging: ks7010: fix ks_wlan_start_xmit()'s return type Luc Van Oostenryck
  2018-04-25 13:50 ` Greg Kroah-Hartman
  2018-04-25 16:40 ` Janusz Lisiecki
@ 2018-04-25 16:44 ` Janusz Lisiecki
  2018-04-26 20:00   ` Luc Van Oostenryck
  2 siblings, 1 reply; 7+ messages in thread
From: Janusz Lisiecki @ 2018-04-25 16:44 UTC (permalink / raw)
  To: Luc Van Oostenryck, linux-kernel
  Cc: devel, Greg Kroah-Hartman, Sergio Paracuellos,
	Gustavo A. R. Silva, Quytelda Kahja, SUNIL KALLUR RAMEGOWDA

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@gmail.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

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH] staging: ks7010: fix ks_wlan_start_xmit()'s return type
  2018-04-25 16:44 ` Janusz Lisiecki
@ 2018-04-26 20:00   ` Luc Van Oostenryck
  0 siblings, 0 replies; 7+ messages in thread
From: Luc Van Oostenryck @ 2018-04-26 20:00 UTC (permalink / raw)
  To: Janusz Lisiecki; +Cc: linux-kernel, Sergio Paracuellos

On Wed, Apr 25, 2018 at 06:44:38PM +0200, Janusz Lisiecki wrote:
> 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.

I see, yes. However, since:
1) this sort of change is really outside the goal of this patch;
2) more change are needed for returning NETDEV_TX_BUSY (most not
   free the skb, probably should stop the queue/device, ...);
3) the driver is actively improving by someone just now (Sergio);
I prefer to let this change to Sergio.

I'll resend my (unimportant) change in a few weeks (if still needed).


Cheers,
-- Luc

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

* [PATCH] staging: ks7010: fix ks_wlan_start_xmit()'s return type
@ 2020-06-28 18:39 ` Luc Van Oostenryck
  0 siblings, 0 replies; 7+ messages in thread
From: Luc Van Oostenryck @ 2020-06-28 18:39 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: 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, but the implementation in this
driver returns an 'int'.

Fix this by returning 'netdev_tx_t' in this driver too and
usind 'NETDEV_TX_OK' instead of 0 accordingly.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.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 211dd4a11cac..334ae1ded684 100644
--- a/drivers/staging/ks7010/ks_wlan_net.c
+++ b/drivers/staging/ks7010/ks_wlan_net.c
@@ -46,7 +46,7 @@ struct wep_key {
  */
 static int ks_wlan_open(struct net_device *dev);
 static void ks_wlan_tx_timeout(struct net_device *dev, unsigned int txqueue);
-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_rx_mode(struct net_device *dev);
 static struct net_device_stats *ks_wlan_get_stats(struct net_device *dev);
@@ -2511,7 +2511,7 @@ void ks_wlan_tx_timeout(struct net_device *dev, unsigned int txqueue)
 }
 
 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;
-- 
2.27.0


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

* [PATCH] staging: ks7010: fix ks_wlan_start_xmit()'s return type
@ 2020-06-28 18:39 ` Luc Van Oostenryck
  0 siblings, 0 replies; 7+ messages in thread
From: Luc Van Oostenryck @ 2020-06-28 18:39 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: 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, but the implementation in this
driver returns an 'int'.

Fix this by returning 'netdev_tx_t' in this driver too and
usind 'NETDEV_TX_OK' instead of 0 accordingly.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.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 211dd4a11cac..334ae1ded684 100644
--- a/drivers/staging/ks7010/ks_wlan_net.c
+++ b/drivers/staging/ks7010/ks_wlan_net.c
@@ -46,7 +46,7 @@ struct wep_key {
  */
 static int ks_wlan_open(struct net_device *dev);
 static void ks_wlan_tx_timeout(struct net_device *dev, unsigned int txqueue);
-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_rx_mode(struct net_device *dev);
 static struct net_device_stats *ks_wlan_get_stats(struct net_device *dev);
@@ -2511,7 +2511,7 @@ void ks_wlan_tx_timeout(struct net_device *dev, unsigned int txqueue)
 }
 
 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;
-- 
2.27.0

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

end of thread, other threads:[~2020-06-28 18:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-24 13:18 [PATCH] staging: ks7010: fix ks_wlan_start_xmit()'s return type Luc Van Oostenryck
2018-04-25 13:50 ` Greg Kroah-Hartman
2018-04-25 16:40 ` Janusz Lisiecki
2018-04-25 16:44 ` Janusz Lisiecki
2018-04-26 20:00   ` Luc Van Oostenryck
2020-06-28 18:39 Luc Van Oostenryck
2020-06-28 18:39 ` Luc Van Oostenryck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.