lkml.org 
[lkml]   [2008]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch 3/8] mm: rotate_reclaimable_page() cleanup
From
Date
> > -int rotate_reclaimable_page(struct page *page)
> > +void rotate_reclaimable_page(struct page *page)
> > {
> > - struct pagevec *pvec;
> > - unsigned long flags;
> > -
> > - if (PageLocked(page))
> > - return 1;
> > - if (PageDirty(page))
> > - return 1;
> > - if (PageActive(page))
> > - return 1;
> > - if (!PageLRU(page))
> > - return 1;
>
> Might be me, but I find the above easier to read than
>
> > + if (!PageLocked(page) && !PageDirty(page) && !PageActive(page) &&
> > + PageLRU(page)) {
> >

Matter of taste, returning from a middle of a function is generally to
be avoided (unless not). Anyway, this is just a side effect of the
main cleanup, so I think I'm entitled to choose the style I prefer ;)

Miklos


\
 
 \ /
  Last update: 2008-03-18 12:59    [W:0.039 / U:1.752 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site