From: Andrew Morton <akpm@linux-foundation.org>
To: Matt Mackall <mpm@selenic.com>
Cc: vapier@gentoo.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] stub out is_swap_pte for !MMU
Date: Fri, 8 Feb 2008 14:05:55 -0800 [thread overview]
Message-ID: <20080208140555.01d3832f.akpm@linux-foundation.org> (raw)
In-Reply-To: <1202506903.17934.653.camel@cinder.waste.org>
On Fri, 08 Feb 2008 15:41:42 -0600
Matt Mackall <mpm@selenic.com> wrote:
> Fix compile error on nommu for is_swap_pte
>
> 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 <mpm@selenic.com>
>
> diff -r 50a6e531a9f2 include/linux/swapops.h
> --- a/include/linux/swapops.h Mon Feb 04 20:23:02 2008 -0600
> +++ b/include/linux/swapops.h Fri Feb 08 15:38:01 2008 -0600
> @@ -42,11 +42,13 @@
> 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);
> }
> +#endif
>
Seems contradictory. Is there _really_ a compilation error at present?
The changelog seems to imply otherwise and no compiler error output is
quoted and it all compiled OK for me on nommu superh.
next prev parent reply other threads:[~2008-02-08 22:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-08 20:02 [PATCH] stub out is_swap_pte for !MMU Mike Frysinger
2008-02-08 20:49 ` Matt Mackall
2008-02-08 21:25 ` Mike Frysinger
2008-02-08 21:41 ` Matt Mackall
2008-02-08 22:05 ` Andrew Morton [this message]
2008-02-08 22:19 ` Matt Mackall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080208140555.01d3832f.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpm@selenic.com \
--cc=vapier@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.