All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Hansen <haveblue@us.ibm.com>
To: Con Kolivas <kernel@kolivas.org>
Cc: linux-mm <linux-mm@kvack.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH] mm: populated_zone
Date: Thu, 17 Nov 2005 15:14:14 +0100	[thread overview]
Message-ID: <1132236854.5834.67.camel@localhost> (raw)
In-Reply-To: <200511180101.43084.kernel@kolivas.org>

On Fri, 2005-11-18 at 01:01 +1100, Con Kolivas wrote:
> +static inline int populated_zone(struct zone *zone)
> +{
> +	return (!!zone->present_pages);
> +}

I really like when people do (zone->present_pages != 0) instead.  I
always do a double-take at the !! stuff.  Hard to understand at a
glance.

A good patch otherwise.  I had to go change a bunch of reference to
present_pages to spanned_pages when testing memory hotplug, and this
would make doing that much easier.

-- Dave


WARNING: multiple messages have this Message-ID (diff)
From: Dave Hansen <haveblue@us.ibm.com>
To: Con Kolivas <kernel@kolivas.org>
Cc: linux-mm <linux-mm@kvack.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH] mm: populated_zone
Date: Thu, 17 Nov 2005 15:14:14 +0100	[thread overview]
Message-ID: <1132236854.5834.67.camel@localhost> (raw)
In-Reply-To: <200511180101.43084.kernel@kolivas.org>

On Fri, 2005-11-18 at 01:01 +1100, Con Kolivas wrote:
> +static inline int populated_zone(struct zone *zone)
> +{
> +	return (!!zone->present_pages);
> +}

I really like when people do (zone->present_pages != 0) instead.  I
always do a double-take at the !! stuff.  Hard to understand at a
glance.

A good patch otherwise.  I had to go change a bunch of reference to
present_pages to spanned_pages when testing memory hotplug, and this
would make doing that much easier.

-- Dave

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2005-11-17 14:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-17 14:01 [PATCH] mm: populated_zone Con Kolivas
2005-11-17 14:01 ` Con Kolivas
2005-11-17 14:14 ` Dave Hansen [this message]
2005-11-17 14:14   ` Dave Hansen

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=1132236854.5834.67.camel@localhost \
    --to=haveblue@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=kernel@kolivas.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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.