On Wed, Jan 15, 2014 at 12:22:17PM +0800, Jeff Liu wrote: > From: Jie Liu <jeff.liu@xxxxxxxxxx> > > Get rid of the self defined list_tail_entry() helper and > use list_last_entry() in zbud_reclaim_page() directly. > > Signed-off-by: Jie Liu <jeff.liu@xxxxxxxxxx> Good find :) Acked-by: Seth Jennings <sjennings@xxxxxxxxxxxxxx> > --- > mm/zbud.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/mm/zbud.c b/mm/zbud.c > index 9451361..8ac1e97 100644 > --- a/mm/zbud.c > +++ b/mm/zbud.c > @@ -360,9 +360,6 @@ void zbud_free(struct zbud_pool *pool, unsigned long handle) > spin_unlock(&pool->lock); > } > > -#define list_tail_entry(ptr, type, member) \ > - list_entry((ptr)->prev, type, member) > - > /** > * zbud_reclaim_page() - evicts allocations from a pool page and frees it > * @pool: pool from which a page will attempt to be evicted > @@ -411,7 +408,7 @@ int zbud_reclaim_page(struct zbud_pool *pool, unsigned int retries) > return -EINVAL; > } > for (i = 0; i < retries; i++) { > - zhdr = list_tail_entry(&pool->lru, struct zbud_header, lru); > + zhdr = list_last_entry(&pool->lru, struct zbud_header, lru); > list_del(&zhdr->lru); > list_del(&zhdr->buddy); > /* Protect zbud page against free */ > -- > 1.8.3.2 > > -- > To unsubscribe, send a message with 'unsubscribe linux-mm' in > the body to majordomo@xxxxxxxxx. For more info on Linux MM, > see: http://www.linux-mm.org/ . > Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a> -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>