unsigned long size,
unsigned alignment, int best_match)
{
- struct list_head *list;
const struct list_head *free_stack = &mm->fl_entry;
struct drm_mm_node *entry;
struct drm_mm_node *best;
best = NULL;
best_size = ~0UL;
- list_for_each(list, free_stack) {
- entry = list_entry(list, struct drm_mm_node, fl_entry);
+ list_for_each_entry(entry, free_stack, fl_entry) {
wasted = 0;
if (entry->size < size)
unsigned long end,
int best_match)
{
- struct list_head *list;
const struct list_head *free_stack = &mm->fl_entry;
struct drm_mm_node *entry;
struct drm_mm_node *best;
best = NULL;
best_size = ~0UL;
- list_for_each(list, free_stack) {
- entry = list_entry(list, struct drm_mm_node, fl_entry);
+ list_for_each_entry(entry, free_stack, fl_entry) {
wasted = 0;
if (entry->size < size)