Commit:     880cdf3a8122288d37829ce01eadf8822bb386db
Parent:     b1d0e4f535e10775cffde922208b49629169aeaa
Author:     Matt Mackall <[EMAIL PROTECTED]>
AuthorDate: Sat Feb 9 00:10:12 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Sat Feb 9 11:08:33 2008 -0800

    Fix compile error on nommu for is_swap_pte
      CC      mm/vmscan.o
    In file included from
    /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/swapops.h: In 
function 'is_swap_pte':
error: implicit declaration of function 'pte_none'
error: implicit declaration of function 'pte_present'
    Does it ever make sense to ask "is this pte a swap entry?" on a machine
    with no MMU?  Presumably this also means it has no ptes too, right?  In
    which case, it's better to comment the whole function out.  Then when
    someone tries to ask the above meaningless question, they get a compile
    error rather than a meaningless answer.
    Signed-off-by: Matt Mackall <[EMAIL PROTECTED]>
    Cc: Mike Frysinger <[EMAIL PROTECTED]>
    Reported-by: Adrian Bunk <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 include/linux/swapops.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/linux/swapops.h b/include/linux/swapops.h
index 7bf2d14..6ec39ab 100644
--- a/include/linux/swapops.h
+++ b/include/linux/swapops.h
@@ -42,11 +42,13 @@ static inline pgoff_t swp_offset(swp_entry_t entry)
        return entry.val & SWP_OFFSET_MASK(entry);
+#ifdef CONFIG_MMU
 /* check whether a pte points to a swap entry */
 static inline int is_swap_pte(pte_t pte)
        return !pte_none(pte) && !pte_present(pte) && !pte_file(pte);
  * Convert the arch-dependent pte representation of a swp_entry_t into an
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to