diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2017-03-31 06:26:15 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-04-03 11:55:19 -0400 |
commit | 684f7d16eff938cf97e465e7bf470c583d4a370b (patch) | |
tree | 47dd4fe3346675163fbc812dfff7e72b9105e99c /drivers/gpu/nvgpu/include | |
parent | 0d8830394adf94fee8f69bc034293d1880e9d8db (diff) |
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>
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/list.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/list.h b/drivers/gpu/nvgpu/include/nvgpu/list.h index c8d2b37a..e6efa254 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/list.h +++ b/drivers/gpu/nvgpu/include/nvgpu/list.h | |||
@@ -56,6 +56,12 @@ static inline int nvgpu_list_empty(struct nvgpu_list_node *head) | |||
56 | return head->next == head; | 56 | return head->next == head; |
57 | } | 57 | } |
58 | 58 | ||
59 | static inline void nvgpu_list_move(struct nvgpu_list_node *node, struct nvgpu_list_node *head) | ||
60 | { | ||
61 | nvgpu_list_del(node); | ||
62 | nvgpu_list_add(node, head); | ||
63 | } | ||
64 | |||
59 | #define nvgpu_list_entry(ptr, type, member) \ | 65 | #define nvgpu_list_entry(ptr, type, member) \ |
60 | type ## _from_ ## member(ptr) | 66 | type ## _from_ ## member(ptr) |
61 | 67 | ||