From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Akinobu Mita <akinobu.mita@gmail.com>
Cc: linux-kernel@vger.kernel.org, Pavel Machek <pavel@suse.cz>,
linux-pm@lists.linux-foundation.org
Subject: Re: [PATCH 1/2] swsusp: simplify memory_bm_find_bit()
Date: Mon, 7 Jul 2008 14:43:07 +0200 [thread overview]
Message-ID: <200807071443.08156.rjw@sisk.pl> (raw)
In-Reply-To: <20080705110946.GA17071@localhost.localdomain>
On Saturday, 5 of July 2008, Akinobu Mita wrote:
> The bit obtained by the function memory_bm_find_bit() is represented
> by addr and bit_nr. The callers of memory_bm_find_bit() just use addr
> and bit_nr as the arguments of set_bit/clear_bit/test_bit.
>
> This patch simplifies the representation of the obtained bit without
> using BM_BITS_PER_CHUNK.
>
> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
> Cc: Pavel Machek <pavel@suse.cz>
> Cc: Rafael J. Wysocki <rjw@sisk.pl>
> Cc: linux-pm@lists.linux-foundation.org
> ---
> kernel/power/snapshot.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> Index: 2.6-git/kernel/power/snapshot.c
> ===================================================================
> --- 2.6-git.orig/kernel/power/snapshot.c
> +++ 2.6-git/kernel/power/snapshot.c
> @@ -478,8 +478,8 @@ static int memory_bm_find_bit(struct mem
> }
> zone_bm->cur_block = bb;
> pfn -= bb->start_pfn;
> - *bit_nr = pfn % BM_BITS_PER_CHUNK;
> - *addr = bb->data + pfn / BM_BITS_PER_CHUNK;
> + *bit_nr = pfn;
> + *addr = bb->data;
> return 0;
> }
Hm, I think it's better to fold that into patch 2/2.
Thanks,
Rafael
prev parent reply other threads:[~2008-07-07 12:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-05 11:10 Akinobu Mita
2008-07-05 11:11 ` [PATCH 2/2] swsusp: simplify memory bitmap Akinobu Mita
2008-07-07 12:49 ` Rafael J. Wysocki
2008-07-07 13:26 ` Akinobu Mita
2008-07-07 12:43 ` Rafael J. Wysocki [this message]
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=200807071443.08156.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=akinobu.mita@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=pavel@suse.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
all inboxes | Powered by JetHome®