mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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:
committed by
David S. Miller
parent
35f6986743
commit
d7907a2b1a
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user