[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Ys2CK/S7gh5hItyI@nanopsycho>
Date: Tue, 12 Jul 2022 16:16:11 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: Ido Schimmel <idosch@...dia.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, kuba@...nel.org,
pabeni@...hat.com, edumazet@...gle.com, mlxsw@...dia.com,
saeedm@...dia.com, moshe@...dia.com, tariqt@...dia.com
Subject: Re: [patch net-next RFC 07/10] mlxsw: convert driver to use unlocked
devlink API during init/fini
Tue, Jul 12, 2022 at 03:33:14PM CEST, idosch@...dia.com wrote:
>On Tue, Jul 12, 2022 at 01:05:08PM +0200, Jiri Pirko wrote:
[...]
>> @@ -2102,6 +2108,7 @@ __mlxsw_core_bus_device_register(const struct mlxsw_bus_info *mlxsw_bus_info,
>> err = -ENOMEM;
>> goto err_devlink_alloc;
>> }
>> + devl_lock(devlink);
>
>Why not just take it in mlxsw_core_bus_device_register() if '!reload' ?
Not possible, devlink is not allocated at that point.
>Easier to read and also consistent with the change in
>mlxsw_core_bus_device_unregister()
>
Powered by blists - more mailing lists