From patchwork Thu Feb 14 01:47:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 220336 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A62932C008C for ; Thu, 14 Feb 2013 13:54:47 +1100 (EST) Received: from localhost ([::1]:51079 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5nw9-000809-TK for incoming@patchwork.ozlabs.org; Wed, 13 Feb 2013 20:48:33 -0500 Received: from eggs.gnu.org ([208.118.235.92]:39088) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5nvq-0007ay-Cf for qemu-devel@nongnu.org; Wed, 13 Feb 2013 20:48:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U5nvf-0006Mb-CQ for qemu-devel@nongnu.org; Wed, 13 Feb 2013 20:48:09 -0500 Received: from mail-da0-f46.google.com ([209.85.210.46]:54586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5nvf-0006M4-4K for qemu-devel@nongnu.org; Wed, 13 Feb 2013 20:48:03 -0500 Received: by mail-da0-f46.google.com with SMTP id p5so845255dak.5 for ; Wed, 13 Feb 2013 17:48:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=EILhIBb7ZL5p3Y8gOdySUGCh/yiMEesFJC9clACsze0=; b=jrQT/2r+TktnpX8qb0Kzqr+reXkoxBnyC9MxzbP7mcHS6fWc5qlj+ADU2QR98mUc// q5alKLRlKXDgHLRsZYPXLCKg37ktsL/tKHJVohEHbyztUVeY+KRUf4CIcdeyMpwdtv8P yh+zrUE5WkeH9aSKI2QfBP3+oQR4CQmDI3GSK+3sP8frP8eCkceTy1NzQvS620GLELuS 2l7Q0SvjsDlxFJ/a+Yws52jiZ8/sV4+cTd++UGFifCWtlv9YtIxzrOLaRaUi5aTXm0Gy gpoKRfAD2a1WlxLKQXn8HT4NSP3DaxBb7iEz6EhmHllGGs5EO/wgxyHqsGICKm6enYU4 wvjg== X-Received: by 10.66.89.132 with SMTP id bo4mr69800248pab.62.1360806481642; Wed, 13 Feb 2013 17:48:01 -0800 (PST) Received: from pebble.twiddle.net (50-194-63-110-static.hfc.comcastbusiness.net. [50.194.63.110]) by mx.google.com with ESMTPS id c3sm44029148pax.9.2013.02.13.17.48.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 13 Feb 2013 17:48:00 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 13 Feb 2013 17:47:41 -0800 Message-Id: <1360806463-23632-9-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1360806463-23632-1-git-send-email-rth@twiddle.net> References: <1360806463-23632-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.210.46 Cc: blauwirbel@gmail.com Subject: [Qemu-devel] [PATCH 08/10] bitops: Inline bitops_flsl X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This is the only remaining user. Signed-off-by: Richard Henderson --- util/bitops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/bitops.c b/util/bitops.c index 9cd1c3a..50b4a81 100644 --- a/util/bitops.c +++ b/util/bitops.c @@ -133,7 +133,7 @@ unsigned long find_last_bit(const unsigned long *addr, unsigned long size) tmp = addr[--words]; if (tmp) { found: - return words * BITS_PER_LONG + bitops_flsl(tmp); + return words * BITS_PER_LONG + BITS_PER_LONG - 1 - clzl(tmp); } }