Linux Power Management development
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: dave@gnu.org
Cc: Pavel Machek <pavel@ucw.cz>, Len Brown <len.brown@intel.com>,
	linux-pm@vger.kernel.org, lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RESEND] PM/Hibernate: use rb_entry
Date: Wed, 24 Oct 2012 23:57:46 +0200	[thread overview]
Message-ID: <6750099.YBevmVYGux@vostro.rjw.lan> (raw)
In-Reply-To: <1349086372.2721.1.camel@offbook>

On Monday 01 of October 2012 12:12:52 Davidlohr Bueso wrote:
> Since the software suspend extents are organized in an rbtree, use rb_entry
> instead of container_of, as it is semantically more appropriate in order to
> get a node as it is iterated.
> 
> Signed-off-by: Davidlohr Bueso <dave@gnu.org>

Applied to linux-pm.git/linux-next as v3.8 material.

Thanks,
Rafael


> ---
>  kernel/power/swap.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/power/swap.c b/kernel/power/swap.c
> index 3c9d764..7c33ed2 100644
> --- a/kernel/power/swap.c
> +++ b/kernel/power/swap.c
> @@ -126,7 +126,7 @@ static int swsusp_extents_insert(unsigned long swap_offset)
>  
>  	/* Figure out where to put the new node */
>  	while (*new) {
> -		ext = container_of(*new, struct swsusp_extent, node);
> +		ext = rb_entry(*new, struct swsusp_extent, node);
>  		parent = *new;
>  		if (swap_offset < ext->start) {
>  			/* Try to merge */
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

           reply	other threads:[~2012-10-24 21:57 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1349086372.2721.1.camel@offbook>]

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=6750099.YBevmVYGux@vostro.rjw.lan \
    --to=rjw@sisk.pl \
    --cc=dave@gnu.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox