Received: from eggs.gnu.org ([2001:4830:134:3::10]:36626) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAIbV-0000PR-2I for qemu-devel@nongnu.org; Tue, 07 Jun 2016 11:07:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bAIbP-0002Cu-Nd for qemu-devel@nongnu.org; Tue, 07 Jun 2016 11:07:39 -0400 References: <92ecec92-44d4-f192-ea66-9425383782eb@redhat.com> From: Michael Tokarev Message-ID: <5756E333.2020809@msgid.tls.msk.ru> Date: Tue, 7 Jun 2016 18:07:31 +0300 MIME-Version: 1.0 In-Reply-To: <92ecec92-44d4-f192-ea66-9425383782eb@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PULL 50/52] pc-bios/s390-ccw: Use DIV_ROUND_UP List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laurent Vivier , qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Cornelia Huck 06.06.2016 16:17, Laurent Vivier wrote: > On 05/06/2016 09:43, Michael Tokarev wrote: >> From: Laurent Vivier >> >> Replace (((n) + (d) - 1) /(d)) by DIV_ROUND_UP(n,d). >> >> This patch is the result of coccinelle script >> scripts/coccinelle/round.cocci >> >> CC: Cornelia Huck >> Signed-off-by: Laurent Vivier >> Signed-off-by: Michael Tokarev >> --- >> pc-bios/s390-ccw/bootmap.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/pc-bios/s390-ccw/bootmap.c b/pc-bios/s390-ccw/bootmap.c >> index 611102e..ecdc52d 100644 >> --- a/pc-bios/s390-ccw/bootmap.c >> +++ b/pc-bios/s390-ccw/bootmap.c >> @@ -599,7 +599,7 @@ static void load_iso_bc_entry(IsoBcSection *load) >> >> if (real_size) { >> /* Round up blocks to load */ >> - blks_to_load = (real_size + ISO_SECTOR_SIZE - 1) / ISO_SECTOR_SIZE; >> + blks_to_load = DIV_ROUND_UP(real_size, ISO_SECTOR_SIZE); >> sclp_print("ISO boot image size verified\n"); >> } else { >> sclp_print("ISO boot image size could not be verified\n"); >> > > I think this one must be dropped from the pull request as s390-ccw files > have no access to the definition of DIV_ROUND_UP. Dropped it now, thank you! /mjt > I missed that because it is not built by default and can only be built > on a s390 system (or with some tricks with a cross-compiler). > > Thanks, > Laurent >