From owner-svn-src-all@freebsd.org Wed Apr 20 15:04:44 2016 Return-Path: Delivered-To: svn-src-all@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 C7921B1608B for ; Wed, 20 Apr 2016 15:04:44 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm47-vm9.bullet.mail.bf1.yahoo.com (nm47-vm9.bullet.mail.bf1.yahoo.com [216.109.114.218]) (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 7D9AD172A for ; Wed, 20 Apr 2016 15:04:44 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1461164681; bh=O6X5VE0Eg24MnhkitNnEfUBcg+ZnSYb553BCmZPlG9c=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From:Subject; b=g+Q6paxNbY9DkAJEqeArVv2y+tYS9Ax9pddF/nWW9Ds/wMYbLXmeEibqjnmYvYfveV+ZdPPe2tzvkGTD9Lor5/PLnv5BDTqVnkIq/e35Vnos4kvukfWkrgwyuDgjkt6/OR+NvvRMpVJf4qniXQLSVm4bBUSChtmrbiAxBWLexmE426e/56cr3MDhju4KKdnQ2Sba0gjsKl9mhwnnMbBMa6ko0DpRxNBazRIAq7wOgeAh2dF5HLGVfmimcsSmVQo1S7/MAO0XqO8gDYtbBMQ3x1X3mof8bbo+Ro00/XlPEILi9V7og91a9S97JJzKbCMdrdUTmKTnJ400deG6TGjT0w== Received: from [98.139.170.179] by nm47.bullet.mail.bf1.yahoo.com with NNFMP; 20 Apr 2016 15:04:41 -0000 Received: from [68.142.230.78] by tm22.bullet.mail.bf1.yahoo.com with NNFMP; 20 Apr 2016 15:04:41 -0000 Received: from [127.0.0.1] by smtp235.mail.bf1.yahoo.com with NNFMP; 20 Apr 2016 15:04:41 -0000 X-Yahoo-Newman-Id: 720905.92508.bm@smtp235.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: RSuORfUVM1mOoxixV7_7YpcKWGKrbqcLRMvbq53z5kWyXLz ReSLPpQqoJYhqPl133sT8eVlF.W_yV_9.2tNx0rQLpMkPQySbYZ9S5tqMA5N qNprBsQDb6veC6rwoySrEnW0RJNX2saHJpu1r10DH_oLX1X4o1UTtTh3UFOu 7RSACzivOGHxCSZEFsmx4to5SusTO08Q2Rej2IYRbKViSE3CRzpRn59hSLUC V1wwHW_LozVRH2m.d7Kf1scYcil4b3kBXDO_7SOEvEz5wwOUkqRcAZlfMVg2 ke4.OiSiGHVLwbYgr3C4dQeqDjdsyDmlmiZcUHdSsWO3h1VAYr6h.ga74Cxt 9zcgnW1XcETJY0DHu5sYQPtmDLsEuoKMPTuT5Poksw17vX3BgZKzdKIylxcF jzGV.nr7SsdnYNvzfqf00aiDddBkEmdV860N4roERPHnU0EMVIpWUDsrc51w iVTXQ69GzKt.Fj4L7onTGteGN.fssPKK7hY9fltzqkBYqYVRSdWZSHEC9bwg HCAwxXrDSFQ4ZgB_Mgg6FFFD4Zxxaf7pw X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r298247 - head/sbin/fdisk_pc98 To: cem@FreeBSD.org References: <201604190446.u3J4kD9G050780@repo.freebsd.org> <4114217.PtcV9LDMal@ralph.baldwin.cx> <20160420115844.Y967@besplex.bde.org> Cc: Bruce Evans , araujo@freebsd.org, John Baldwin , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Pedro Giffuni Message-ID: <3ddd1087-e83a-d14c-1cc2-951a6d23306f@FreeBSD.org> Date: Wed, 20 Apr 2016 10:04:47 -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-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Apr 2016 15:04:44 -0000 On 04/20/16 09:41, Conrad Meyer wrote: > On Wed, Apr 20, 2016 at 7:33 AM, Pedro Giffuni wrote: >> One of the things I dislike is that most of the macros are in >> lowercase. Lowercase would make sense if these were inline functions >> but inline functions have disadvantages for these use cases. >> OTOH, if they were uppercase, they would not be very easy on the eyes, >> which is the current advantage. > > > You bring up a good point. Obviously nitems() can't be an inline > function, but roundup2() and friends could. Is there any reason not > to change them over to inline functions? > That would be interesting. The question would be if there are type issues. I guess most uses require ints but some many use size_t. If you are willing to try that, have a look at his patch: https://people.freebsd.org/~pfg/patches/sys-roundup2.diff I also have a coccinelle "patch" to replace howmany() and roundup(). Pedro.