From owner-svn-src-head@freebsd.org Sat Apr 30 19:39:45 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D60DB22146 for ; Sat, 30 Apr 2016 19:39:45 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm31-vm8.bullet.mail.bf1.yahoo.com (nm31-vm8.bullet.mail.bf1.yahoo.com [72.30.239.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C99CA1502 for ; Sat, 30 Apr 2016 19:39:44 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1462045177; bh=OaxpYMdcrwaH81Iyb3aAv/H+IeV8BmVFIsyJgyKiZ3A=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From:Subject; b=Q09MN33eVEYnNMWd+oTibx5qtAoisN23GwPHe3hqF+KkPP8CoOPnPyb1nNT5BeBG7Auq4tGISWvY3b+mnhW4wv8LMlioluFddq5HvJKKD7aFskBnq427C9c04Tnx1ecY1JWw+cJuc7NypgIIZoxjFA+z4y+eGKpyHkKpL2cJ2eq/VlfwQoH5VGXLUtT1BGZJFyFT8pw2Z9ql6HKSGCO9Cc61/0tiNK4YBiBETgaM6NSPMtKvLUMY7HoM2GIB9GVaRFltV+xPrEWpp/sHgTp6UzYqjdTp2/86E8WH5KGIlzt9jdxG0YdM97UnQBht/fqMDCVJEOyga9ztoTASqb3Rwg== Received: from [66.196.81.172] by nm31.bullet.mail.bf1.yahoo.com with NNFMP; 30 Apr 2016 19:39:37 -0000 Received: from [98.139.211.200] by tm18.bullet.mail.bf1.yahoo.com with NNFMP; 30 Apr 2016 19:39:37 -0000 Received: from [127.0.0.1] by smtp209.mail.bf1.yahoo.com with NNFMP; 30 Apr 2016 19:39:37 -0000 X-Yahoo-Newman-Id: 101729.16552.bm@smtp209.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: .ByMw7QVM1kVD0LvuHZzgsxPc1oW9Wqm2Noq.Snt0Xr.Obx fab7Css4qArAm3F6RZdRf9jxZiUGEQgN98gJCCVQPfW5_CBBFWmdfaRqMYKF Ww7qXUSZIEd94wkV60cTEE2gQ.gOIxZdwRD2Ln4z7SNBNa5BN7lk3wM8duD0 2eaYFshKEWkFezNhEJxdxTnn55W9BhZG4DFBFEWiUuauEyIxl9C_ofYAlWz0 IDZKNy35gXceurL64xhwnQ0yyh9tLFgPjCwXHrlXD0vPhOhv7C0mUUCUWu8t s6hXK.JAOgGD1CXryg9VUT.W6EFU2H3P80_q0aUu59hqeCKvlfnP4wumZy7w fkmSbuAevNTeSoippdNQtoRd8IgQQpQTXfYJb_dnHaDbQbQSofziIImCfMQr Wz3IwKFfJ_ZdMZ_PgubFw8hXiBtE6P87kiV72fhqXRfTaSfGsbqNmgrL1bqv NQSnuApzkAPVOiEnYs6KDXWRnZ1LK2.EoLe_cDVuKqAMjwecxbeFIlvsi.lT lCsD6ZGTt.uXAhY4uLmVFkNsp2x4nx1TC X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r298856 - head/sys/powerpc/powerpc To: Justin Hibbits References: <201604301856.u3UIuZpi026290@repo.freebsd.org> Cc: src-committers , svn-src-head@freebsd.org, svn-src-all@freebsd.org From: Pedro Giffuni Message-ID: <127f3109-39f9-c65f-2c16-140c6a878de9@FreeBSD.org> Date: Sat, 30 Apr 2016 14:39:36 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Apr 2016 19:39:45 -0000 On 04/30/16 14:24, Justin Hibbits wrote: > > On Apr 30, 2016 13:56, "Pedro F. Giffuni" > wrote: >> >> Author: pfg >> Date: Sat Apr 30 18:56:35 2016 >> New Revision: 298856 >> URL: https://svnweb.freebsd.org/changeset/base/298856 >> >> Log: >> powerpc: Make use of our rounddown() macro when sys/param.h is > available. >> >> No functional change. >> >> Modified: >> head/sys/powerpc/powerpc/exec_machdep.c >> >> Modified: head/sys/powerpc/powerpc/exec_machdep.c >> > ============================================================================== >> --- head/sys/powerpc/powerpc/exec_machdep.c Sat Apr 30 18:07:13 > 2016 (r298855) >> +++ head/sys/powerpc/powerpc/exec_machdep.c Sat Apr 30 18:56:35 > 2016 (r298856) >> @@ -162,7 +162,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, >> code = siginfo32.si_code; >> sfp = (caddr_t)&sf32; >> sfpsize = sizeof(sf32); >> - rndfsize = ((sizeof(sf32) + 15) / 16) * 16; >> + rndfsize = rounddown(sizeof(sf32) + 15, 16); >> >> /* >> * Save user context >> @@ -189,9 +189,9 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, >> * 64-bit PPC defines a 288 byte scratch region >> * below the stack. >> */ >> - rndfsize = 288 + ((sizeof(sf) + 47) / 48) * 48; >> + rndfsize = 288 + rounddown(sizeof(sf) + 47, 48); >> #else >> - rndfsize = ((sizeof(sf) + 15) / 16) * 16; >> + rndfsize = rounddown(sizeof(sf) + 15, 16); >> #endif >> >> /* >> > > I think these should all be roundup(sizeof(sf), (16 or 48)). > Yes, makes sense. roundup() is a special case of rounddown() but coccinelle doesn't do math ;). Thanks, Pedro.