devlink: Remove duplicated registration check

Both registered flag and devlink pointer are set at the same time
and indicate the same thing - devlink/devlink_port are ready. Instead
of checking ->registered use devlink pointer as an indication.

Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Leon Romanovsky
2021-07-28 10:33:47 +03:00
committed by David S. Miller
parent 35f6986743
commit d7907a2b1a
2 changed files with 11 additions and 12 deletions

View File

@@ -55,8 +55,7 @@ struct devlink {
* port, sb, dpipe, resource, params, region, traps and more.
*/
u8 reload_failed:1,
reload_enabled:1,
registered:1;
reload_enabled:1;
char priv[0] __aligned(NETDEV_ALIGN);
};
@@ -158,7 +157,6 @@ struct devlink_port {
struct list_head region_list;
struct devlink *devlink;
unsigned int index;
bool registered;
spinlock_t type_lock; /* Protects type and type_dev
* pointer consistency.
*/