/* * Simple doubly linked list, based on the Linux kernel linked list. * * Copyright (C) 2015 Tobias Klauser * * This file is part of llmnrd. * * llmnrd is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, version 2 of the License. * * llmnrd is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with llmnrd. If not, see . */ #ifndef LIST_H #define LIST_H #include #include "compiler.h" struct list_head { struct list_head *next, *prev; }; static inline void INIT_LIST_HEAD(struct list_head *list) { list->next = list; list->prev = list; } static inline void __list_add(struct list_head *obj, struct list_head *prev, struct list_head *next) { prev->next = obj; obj->prev = prev; obj->next = next; next->prev = obj; } static inline void list_add_tail(struct list_head *obj, struct list_head *head) { __list_add(obj, head->prev, head); } static inline void list_add_head(struct list_head *obj, struct list_head *head) { __list_add(obj, head, head->next); } static inline void list_del(struct list_head *obj) { obj->next->prev = obj->prev; obj->prev->next = obj->next; } static inline bool list_empty(struct list_head *head) { return head->next == head; } #define list_entry(ptr, type, member) container_of(ptr, type, member) #define list_for_each_entry(pos, head, member) \ for (pos = list_entry((head)->next, typeof(*pos), member); \ &(pos)->member != (head); \ (pos) = list_entry((pos)->member.next, typeof(*(pos)), member)) #define list_for_each_entry_safe(pos, n, head, member) \ for (pos = list_entry((head)->next, typeof(*pos), member), \ n = list_entry(pos->member.next, typeof(*pos), member); \ &(pos)->member != (head); \ pos = n, n = list_entry(n->member.next, typeof(*n), member)) #endif /* LIST_H */ n value='grep'>log msg
diff options
context:
space:
mode:
authorDeepak M <m.deepak@intel.com>2016-09-15 15:01:10 +0530
committerJani Nikula <jani.nikula@intel.com>2016-09-15 13:57:36 +0300
commit6f3fff602e8179c74249a66046cf88767e1923b2 (patch)
tree3f859930034076acc2b9a1b7d34e6b63445bed5f
parent7a9347f947757f6c5ea432b299a8ba33ef7b78c7 (diff)
drm/i915: Add ddb size field to device info structure
Adding the ddb size into the devide info will avoid platform checks while computing wm. v2: Added comment and WARN_ON if ddb size is zero.(Jani) v3: Added WARN_ON at the right place.(Jani) Suggested-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> Signed-off-by: Deepak M <m.deepak@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1473931870-7724-1-git-send-email-m.deepak@intel.com