From: WANG Cong <xiyou.wangcong@gmail.com>
To: olsajiri@gmail.com
Cc: jdike@addtoit.com, kernel-janitors@vger.kernel.org,
user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] [PATCH] uml: use DIV_ROUND_UP
Date: Wed, 20 Feb 2008 10:44:44 +0800 (CST) [thread overview]
Message-ID: <20080220.104444.124086115.xiyou.wangcong@gmail.com> (raw)
In-Reply-To: <47BB4EED.7020109@gmail.com>
From: Jiri Olsa <olsajiri@gmail.com>
Subject: [PATCH] uml: use DIV_ROUND_UP
Date: Tue, 19 Feb 2008 22:49:33 +0100
Message-ID: <47BB4EED.7020109@gmail.com>
> Hi,
>
> I just saw similar patches in the janitor kernel's list,
> and spotted place it fits.
>
> Signed-off-by: Jiri Olsa <olsajiri@gmail.com>
> ---
> arch/um/drivers/ubd_kern.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
> index b1a77b1..1e579e4 100644
> --- a/arch/um/drivers/ubd_kern.c
> +++ b/arch/um/drivers/ubd_kern.c
> @@ -1020,8 +1020,7 @@ static void cowify_bitmap(__u64 io_offset, int length, unsigned long *cow_mask,
> * by one word. Thanks to Lynn Kerby for the fix and James McMechan
> * for the original diagnosis.
> */
> - if(*cow_offset == ((bitmap_len + sizeof(unsigned long) - 1) /
> - sizeof(unsigned long) - 1))
> + if(*cow_offset == (DIV_ROUND_UP(bitmap_len, sizeof(unsigned long)) - 1))
Looks good for me. ACK.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next prev parent reply other threads:[~2008-02-20 2:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-19 21:49 [uml-devel] [PATCH] uml: use DIV_ROUND_UP Jiri Olsa
2008-02-20 2:44 ` WANG Cong [this message]
2008-02-20 16:18 ` Jeff Dike
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=20080220.104444.124086115.xiyou.wangcong@gmail.com \
--to=xiyou.wangcong@gmail.com \
--cc=jdike@addtoit.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=olsajiri@gmail.com \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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