All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net v1 1/1] ethtool: fix incorrect datatype in set_eee ops
@ 2021-04-06 13:17 Wong Vee Khee
  2021-04-06 18:54 ` Jakub Kicinski
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Wong Vee Khee @ 2021-04-06 13:17 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski
  Cc: Michal Kubecek, netdev, linux-kernel, stable

The member 'tx_lpi_timer' is defined with __u32 datatype in the ethtool
header file. Hence, we should use ethnl_update_u32() in set_eee ops.

Fixes: fd77be7bd43c ("ethtool: set EEE settings with EEE_SET request")
Cc: <stable@vger.kernel.org> # 5.10.x
Cc: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: Wong Vee Khee <vee.khee.wong@linux.intel.com>
---
 net/ethtool/eee.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/ethtool/eee.c b/net/ethtool/eee.c
index 901b7de941ab..e10bfcc07853 100644
--- a/net/ethtool/eee.c
+++ b/net/ethtool/eee.c
@@ -169,8 +169,8 @@ int ethnl_set_eee(struct sk_buff *skb, struct genl_info *info)
 	ethnl_update_bool32(&eee.eee_enabled, tb[ETHTOOL_A_EEE_ENABLED], &mod);
 	ethnl_update_bool32(&eee.tx_lpi_enabled,
 			    tb[ETHTOOL_A_EEE_TX_LPI_ENABLED], &mod);
-	ethnl_update_bool32(&eee.tx_lpi_timer, tb[ETHTOOL_A_EEE_TX_LPI_TIMER],
-			    &mod);
+	ethnl_update_u32(&eee.tx_lpi_timer, tb[ETHTOOL_A_EEE_TX_LPI_TIMER],
+			 &mod);
 	ret = 0;
 	if (!mod)
 		goto out_ops;
-- 
2.25.1


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

* Re: [PATCH net v1 1/1] ethtool: fix incorrect datatype in set_eee ops
  2021-04-06 13:17 [PATCH net v1 1/1] ethtool: fix incorrect datatype in set_eee ops Wong Vee Khee
@ 2021-04-06 18:54 ` Jakub Kicinski
  2021-04-06 19:13 ` Michal Kubecek
  2021-04-06 23:50 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Jakub Kicinski @ 2021-04-06 18:54 UTC (permalink / raw)
  To: Wong Vee Khee
  Cc: David S . Miller, Michal Kubecek, netdev, linux-kernel, stable

On Tue,  6 Apr 2021 21:17:30 +0800 Wong Vee Khee wrote:
> The member 'tx_lpi_timer' is defined with __u32 datatype in the ethtool
> header file. Hence, we should use ethnl_update_u32() in set_eee ops.
> 
> Fixes: fd77be7bd43c ("ethtool: set EEE settings with EEE_SET request")
> Cc: <stable@vger.kernel.org> # 5.10.x
> Cc: Michal Kubecek <mkubecek@suse.cz>
> Signed-off-by: Wong Vee Khee <vee.khee.wong@linux.intel.com>

Reviewed-by: Jakub Kicinski <kuba@kernel.org>

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

* Re: [PATCH net v1 1/1] ethtool: fix incorrect datatype in set_eee ops
  2021-04-06 13:17 [PATCH net v1 1/1] ethtool: fix incorrect datatype in set_eee ops Wong Vee Khee
  2021-04-06 18:54 ` Jakub Kicinski
@ 2021-04-06 19:13 ` Michal Kubecek
  2021-04-06 23:50 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Michal Kubecek @ 2021-04-06 19:13 UTC (permalink / raw)
  To: Wong Vee Khee
  Cc: David S . Miller, Jakub Kicinski, netdev, linux-kernel, stable

[-- Attachment #1: Type: text/plain, Size: 1472 bytes --]

On Tue, Apr 06, 2021 at 09:17:30PM +0800, Wong Vee Khee wrote:
> The member 'tx_lpi_timer' is defined with __u32 datatype in the ethtool
> header file. Hence, we should use ethnl_update_u32() in set_eee ops.

To be precise, the correct reason is that unlike .eee_enabled and
.tx_lpi_enabled, .tx_lpi_timer value is interpreted as a number, not
a logical value (those two are also __u32). But I don't think it's
necessary to resubmit.

Reviewed-by: Michal Kubecek <mkubecek@suse.cz>

> Fixes: fd77be7bd43c ("ethtool: set EEE settings with EEE_SET request")
> Cc: <stable@vger.kernel.org> # 5.10.x
> Cc: Michal Kubecek <mkubecek@suse.cz>
> Signed-off-by: Wong Vee Khee <vee.khee.wong@linux.intel.com>
> ---
>  net/ethtool/eee.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/net/ethtool/eee.c b/net/ethtool/eee.c
> index 901b7de941ab..e10bfcc07853 100644
> --- a/net/ethtool/eee.c
> +++ b/net/ethtool/eee.c
> @@ -169,8 +169,8 @@ int ethnl_set_eee(struct sk_buff *skb, struct genl_info *info)
>  	ethnl_update_bool32(&eee.eee_enabled, tb[ETHTOOL_A_EEE_ENABLED], &mod);
>  	ethnl_update_bool32(&eee.tx_lpi_enabled,
>  			    tb[ETHTOOL_A_EEE_TX_LPI_ENABLED], &mod);
> -	ethnl_update_bool32(&eee.tx_lpi_timer, tb[ETHTOOL_A_EEE_TX_LPI_TIMER],
> -			    &mod);
> +	ethnl_update_u32(&eee.tx_lpi_timer, tb[ETHTOOL_A_EEE_TX_LPI_TIMER],
> +			 &mod);
>  	ret = 0;
>  	if (!mod)
>  		goto out_ops;
> -- 
> 2.25.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH net v1 1/1] ethtool: fix incorrect datatype in set_eee ops
  2021-04-06 13:17 [PATCH net v1 1/1] ethtool: fix incorrect datatype in set_eee ops Wong Vee Khee
  2021-04-06 18:54 ` Jakub Kicinski
  2021-04-06 19:13 ` Michal Kubecek
@ 2021-04-06 23:50 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-04-06 23:50 UTC (permalink / raw)
  To: Wong Vee Khee; +Cc: davem, kuba, mkubecek, netdev, linux-kernel, stable

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Tue,  6 Apr 2021 21:17:30 +0800 you wrote:
> The member 'tx_lpi_timer' is defined with __u32 datatype in the ethtool
> header file. Hence, we should use ethnl_update_u32() in set_eee ops.
> 
> Fixes: fd77be7bd43c ("ethtool: set EEE settings with EEE_SET request")
> Cc: <stable@vger.kernel.org> # 5.10.x
> Cc: Michal Kubecek <mkubecek@suse.cz>
> Signed-off-by: Wong Vee Khee <vee.khee.wong@linux.intel.com>
> 
> [...]

Here is the summary with links:
  - [net,v1,1/1] ethtool: fix incorrect datatype in set_eee ops
    https://git.kernel.org/netdev/net/c/63cf32389925

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2021-04-06 23:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-06 13:17 [PATCH net v1 1/1] ethtool: fix incorrect datatype in set_eee ops Wong Vee Khee
2021-04-06 18:54 ` Jakub Kicinski
2021-04-06 19:13 ` Michal Kubecek
2021-04-06 23:50 ` patchwork-bot+netdevbpf

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.