From 684f7d16eff938cf97e465e7bf470c583d4a370b Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Fri, 31 Mar 2017 15:56:15 +0530 Subject: 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 Reviewed-on: http://git-master/r/1454008 Reviewed-by: svccoveritychecker GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/include/nvgpu/list.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers') 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) 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) -- cgit v1.2.2