[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200131100706.5c98981e@cakuba.hsd1.ca.comcast.net>
Date: Fri, 31 Jan 2020 10:07:06 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Jacob Keller <jacob.e.keller@...el.com>
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 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.
> +{
> + struct devlink_snapshot *snapshot;
lockdep_assert_held() is much better than just a kdoc comment.
> + /* check if region can hold one more snapshot */
> + if (region->cur_snapshots == region->max_snapshots)
> + return -ENOMEM;
Powered by blists - more mailing lists