[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221217011953.152487-7-kuba@kernel.org>
Date: Fri, 16 Dec 2022 17:19:49 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: jiri@...nulli.us, jacob.e.keller@...el.com, leon@...nel.org
Cc: netdev@...r.kernel.org, Jakub Kicinski <kuba@...nel.org>
Subject: [RFC net-next 06/10] devlink: don't require setting features before registration
Requiring devlink_set_features() to be run before devlink is
registered is overzealous. devlink_set_features() itself is
a leftover from old workarounds which were trying to prevent
initiating reload before probe was complete.
Signed-off-by: Jakub Kicinski <kuba@...nel.org>
---
net/devlink/core.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/net/devlink/core.c b/net/devlink/core.c
index 413b92534ad6..f30fc167c8ad 100644
--- a/net/devlink/core.c
+++ b/net/devlink/core.c
@@ -131,8 +131,6 @@ struct devlink *devlinks_xa_find_get(struct net *net, unsigned long *indexp)
*/
void devlink_set_features(struct devlink *devlink, u64 features)
{
- ASSERT_DEVLINK_NOT_REGISTERED(devlink);
-
WARN_ON(features & DEVLINK_F_RELOAD &&
!devlink_reload_supported(devlink->ops));
devlink->features = features;
--
2.38.1
Powered by blists - more mailing lists