From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37183) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIYWj-0000qm-Mh for qemu-devel@nongnu.org; Fri, 24 Jul 2015 04:40:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZIYWg-0001AK-Ey for qemu-devel@nongnu.org; Fri, 24 Jul 2015 04:40:21 -0400 Received: from mail-vn0-f44.google.com ([209.85.216.44]:34515) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIYWg-0001AD-Ad for qemu-devel@nongnu.org; Fri, 24 Jul 2015 04:40:18 -0400 Received: by vnds125 with SMTP id s125so6526846vnd.1 for ; Fri, 24 Jul 2015 01:40:17 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <55B1C8BF.7060806@redhat.com> References: <1437649738-13885-1-git-send-email-peter.maydell@linaro.org> <55B11C5C.8050507@redhat.com> <55B1C8BF.7060806@redhat.com> From: Peter Maydell Date: Fri, 24 Jul 2015 09:39:58 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH 0/5] replace qemu_fls() with pow2ceil()/pow2floor() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Kevin Wolf , Qemu-block , "Michael S. Tsirkin" , Patch Tracking , QEMU Developers , Keith Busch On 24 July 2015 at 06:10, Paolo Bonzini wrote: > > > On 23/07/2015 22:10, Peter Maydell wrote: >>> > The series looks good, but I'd prefer (especially for patch 4 which is >>> > in a fast path) if pow2ceil and pow2floor were made inline. >> Yeah, I was wondering if I was going to be asked to do that. >> Note that qemu_fls() is/was *not* inline, though, so you're >> taking an out-of-line function call on these code paths >> already. > > But in patch 4 the call is only in the rare case where "l & (l - 1)" is > not zero. True. Any preferences for which header file to put them in? qemu-common.h is where the prototype is currently and where the inline is_power_of_2() is defined... thanks -- PMM