All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: dsa: use NL_SET_ERR_MSG_WEAK_MOD() more consistently
@ 2023-02-02 14:03 Vladimir Oltean
  2023-02-03 19:43 ` Simon Horman
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Vladimir Oltean @ 2023-02-02 14:03 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Andrew Lunn, Florian Fainelli

Now that commit 028fb19c6ba7 ("netlink: provide an ability to set
default extack message") provides a weak function that doesn't override
an existing extack message provided by the driver, it makes sense to use
it also for LAG and HSR offloading, not just for bridge offloading.

Also consistently put the message string on a separate line, to reduce
line length from 92 to 84 characters.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 net/dsa/slave.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 26c458f50ac6..6957971c2db2 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -2692,7 +2692,8 @@ static int dsa_slave_changeupper(struct net_device *dev,
 			if (!err)
 				dsa_bridge_mtu_normalization(dp);
 			if (err == -EOPNOTSUPP) {
-				NL_SET_ERR_MSG_WEAK_MOD(extack, "Offloading not supported");
+				NL_SET_ERR_MSG_WEAK_MOD(extack,
+							"Offloading not supported");
 				err = 0;
 			}
 			err = notifier_from_errno(err);
@@ -2705,8 +2706,8 @@ static int dsa_slave_changeupper(struct net_device *dev,
 			err = dsa_port_lag_join(dp, info->upper_dev,
 						info->upper_info, extack);
 			if (err == -EOPNOTSUPP) {
-				NL_SET_ERR_MSG_MOD(info->info.extack,
-						   "Offloading not supported");
+				NL_SET_ERR_MSG_WEAK_MOD(extack,
+							"Offloading not supported");
 				err = 0;
 			}
 			err = notifier_from_errno(err);
@@ -2718,8 +2719,8 @@ static int dsa_slave_changeupper(struct net_device *dev,
 		if (info->linking) {
 			err = dsa_port_hsr_join(dp, info->upper_dev);
 			if (err == -EOPNOTSUPP) {
-				NL_SET_ERR_MSG_MOD(info->info.extack,
-						   "Offloading not supported");
+				NL_SET_ERR_MSG_WEAK_MOD(extack,
+							"Offloading not supported");
 				err = 0;
 			}
 			err = notifier_from_errno(err);
-- 
2.34.1


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

* Re: [PATCH net-next] net: dsa: use NL_SET_ERR_MSG_WEAK_MOD() more consistently
  2023-02-02 14:03 [PATCH net-next] net: dsa: use NL_SET_ERR_MSG_WEAK_MOD() more consistently Vladimir Oltean
@ 2023-02-03 19:43 ` Simon Horman
  2023-02-03 19:51 ` Florian Fainelli
  2023-02-04  3:30 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2023-02-03 19:43 UTC (permalink / raw)
  To: Vladimir Oltean
  Cc: netdev, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Andrew Lunn, Florian Fainelli

On Thu, Feb 02, 2023 at 04:03:54PM +0200, Vladimir Oltean wrote:
> Now that commit 028fb19c6ba7 ("netlink: provide an ability to set
> default extack message") provides a weak function that doesn't override
> an existing extack message provided by the driver, it makes sense to use
> it also for LAG and HSR offloading, not just for bridge offloading.
> 
> Also consistently put the message string on a separate line, to reduce
> line length from 92 to 84 characters.
> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>

Reviewed-by: Simon Horman <simon.horman@corigine.com>


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

* Re: [PATCH net-next] net: dsa: use NL_SET_ERR_MSG_WEAK_MOD() more consistently
  2023-02-02 14:03 [PATCH net-next] net: dsa: use NL_SET_ERR_MSG_WEAK_MOD() more consistently Vladimir Oltean
  2023-02-03 19:43 ` Simon Horman
@ 2023-02-03 19:51 ` Florian Fainelli
  2023-02-04  3:30 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2023-02-03 19:51 UTC (permalink / raw)
  To: Vladimir Oltean, netdev
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Andrew Lunn

On 2/2/23 06:03, Vladimir Oltean wrote:
> Now that commit 028fb19c6ba7 ("netlink: provide an ability to set
> default extack message") provides a weak function that doesn't override
> an existing extack message provided by the driver, it makes sense to use
> it also for LAG and HSR offloading, not just for bridge offloading.
> 
> Also consistently put the message string on a separate line, to reduce
> line length from 92 to 84 characters.
> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian


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

* Re: [PATCH net-next] net: dsa: use NL_SET_ERR_MSG_WEAK_MOD() more consistently
  2023-02-02 14:03 [PATCH net-next] net: dsa: use NL_SET_ERR_MSG_WEAK_MOD() more consistently Vladimir Oltean
  2023-02-03 19:43 ` Simon Horman
  2023-02-03 19:51 ` Florian Fainelli
@ 2023-02-04  3:30 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-02-04  3:30 UTC (permalink / raw)
  To: Vladimir Oltean; +Cc: netdev, davem, edumazet, kuba, pabeni, andrew, f.fainelli

Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Thu,  2 Feb 2023 16:03:54 +0200 you wrote:
> Now that commit 028fb19c6ba7 ("netlink: provide an ability to set
> default extack message") provides a weak function that doesn't override
> an existing extack message provided by the driver, it makes sense to use
> it also for LAG and HSR offloading, not just for bridge offloading.
> 
> Also consistently put the message string on a separate line, to reduce
> line length from 92 to 84 characters.
> 
> [...]

Here is the summary with links:
  - [net-next] net: dsa: use NL_SET_ERR_MSG_WEAK_MOD() more consistently
    https://git.kernel.org/netdev/net-next/c/d795527d5079

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:[~2023-02-04  3:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-02 14:03 [PATCH net-next] net: dsa: use NL_SET_ERR_MSG_WEAK_MOD() more consistently Vladimir Oltean
2023-02-03 19:43 ` Simon Horman
2023-02-03 19:51 ` Florian Fainelli
2023-02-04  3:30 ` 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.