mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: add nvgpu_list_move API
Add new API to remove a node from one list and to add it to another head Jira NVGPU-13 Change-Id: I1c86cde1cdfea35bd554f175b9d270a7fd4b40e5 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/1454008 Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
0d8830394a
commit
684f7d16ef
@@ -56,6 +56,12 @@ static inline int nvgpu_list_empty(struct nvgpu_list_node *head)
|
||||
return head->next == head;
|
||||
}
|
||||
|
||||
static inline void nvgpu_list_move(struct nvgpu_list_node *node, struct nvgpu_list_node *head)
|
||||
{
|
||||
nvgpu_list_del(node);
|
||||
nvgpu_list_add(node, head);
|
||||
}
|
||||
|
||||
#define nvgpu_list_entry(ptr, type, member) \
|
||||
type ## _from_ ## member(ptr)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user