[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8cb6ab98-9d20-4965-f230-0a4ad229be97@intel.com>
Date: Fri, 31 Jan 2020 10:09:54 -0800
From: Jacob Keller <jacob.e.keller@...el.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org, jiri@...nulli.us, valex@...lanox.com,
linyunsheng@...wei.com, lihong.yang@...el.com
Subject: Re: [PATCH 02/15] devlink: add functions to take snapshot while
locked
On 1/31/2020 10:07 AM, Jakub Kicinski wrote:
> On Thu, 30 Jan 2020 14:58:57 -0800, Jacob Keller wrote:
>> +static int
>> +devlink_region_snapshot_create_locked(struct devlink_region *region,
>> + u8 *data, u32 snapshot_id,
>> + devlink_snapshot_data_dest_t *destructor)
>
> -1 on the _locked suffix. Please follow the time-honored tradition of
> using double underscore for internal helpers which make assumption
> about calling context.
>
Sure.
>> +{
>> + struct devlink_snapshot *snapshot;
>
> lockdep_assert_held() is much better than just a kdoc comment.
>
Ok.
>> + /* check if region can hold one more snapshot */
>> + if (region->cur_snapshots == region->max_snapshots)
>> + return -ENOMEM;
Powered by blists - more mailing lists