From patchwork Wed Mar 11 14:18:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 45668 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 63FAC214BF for ; Wed, 11 Mar 2015 14:20:03 +0000 (UTC) Received: by lams18 with SMTP id s18sf6986172lam.2 for ; Wed, 11 Mar 2015 07:20:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=GsESBAJxR7ZaK+34lrOCsEVAHt2MTNVbIuMrDwsGRKI=; b=PNcOaIwX9g15GkkiAxO2YLKlg+ulQVRuY//dAuznDLSdWbEU8ehSASK8jyhUoYXYJb tgD5YUviG9zSuvFYw770Rp6zSNOKpunW2q8xQoN1X7rA4Xqiy4yyrvBjOdyYXOrbzzT+ 6afaJcLcz/ikIpwGbPU9fumvyJrT+2L4OCes71khksokOW/kcWx3Kh9XigKBUQQ/aGU8 6ov6ZrbxEQ8td9UNwREFBzGaALTq3Ceo9C88G9C5akW2yQEWdA8JN/S0e+3VFhYDehIO LlQ/+zatkexL1hQ9tnhHhNBsuMbctkQTKKD8QqNfooLFEDJx9ZDge99jeqhrhFcxXJzO ysQw== X-Gm-Message-State: ALoCoQlBmvrk8vRF0M2tIzzvsj589D8iM3n57l9W7VjleHCbk1DLRQYaWXApziNxRv/hbhhfzC+3 X-Received: by 10.180.90.175 with SMTP id bx15mr2216804wib.3.1426083602176; Wed, 11 Mar 2015 07:20:02 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.121.5 with SMTP id lg5ls136098lab.106.gmail; Wed, 11 Mar 2015 07:20:01 -0700 (PDT) X-Received: by 10.152.45.37 with SMTP id j5mr35326270lam.31.1426083601882; Wed, 11 Mar 2015 07:20:01 -0700 (PDT) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id be6si2399270lab.127.2015.03.11.07.20.01 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Mar 2015 07:20:01 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by lamq1 with SMTP id q1so9054927lam.12 for ; Wed, 11 Mar 2015 07:20:01 -0700 (PDT) X-Received: by 10.112.162.167 with SMTP id yb7mr34099645lbb.76.1426083601756; Wed, 11 Mar 2015 07:20:01 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp2809771lbj; Wed, 11 Mar 2015 07:20:01 -0700 (PDT) X-Received: by 10.140.17.9 with SMTP id 9mr46324834qgc.21.1426083600328; Wed, 11 Mar 2015 07:20:00 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id h34si3567361qgf.2.2015.03.11.07.19.59 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 11 Mar 2015 07:20:00 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:54946 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVhUN-00069Q-7R for patch@linaro.org; Wed, 11 Mar 2015 10:19:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38090) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVhTJ-0004yW-5w for qemu-devel@nongnu.org; Wed, 11 Mar 2015 10:18:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVhTI-0002hK-Ci for qemu-devel@nongnu.org; Wed, 11 Mar 2015 10:18:53 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:55225) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVhTH-0002gl-UI for qemu-devel@nongnu.org; Wed, 11 Mar 2015 10:18:52 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1YVhTG-0001zh-P0 for qemu-devel@nongnu.org; Wed, 11 Mar 2015 14:18:50 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Date: Wed, 11 Mar 2015 14:18:50 +0000 Message-Id: <1426083530-7591-11-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1426083530-7591-1-git-send-email-peter.maydell@linaro.org> References: <1426083530-7591-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Subject: [Qemu-devel] [PULL 10/10] bitops.h: sextract64() return type should be int64_t, not uint64_t 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 The documentation for sextract64() claims that the return type is an int64_t, but the code itself disagrees. Fix the return type to conform to the documentation and to bring it into line with sextract32(), which returns int32_t. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 1423231328-15662-1-git-send-email-peter.maydell@linaro.org --- include/qemu/bitops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qemu/bitops.h b/include/qemu/bitops.h index 181bd46..90ca8df 100644 --- a/include/qemu/bitops.h +++ b/include/qemu/bitops.h @@ -354,7 +354,7 @@ static inline int32_t sextract32(uint32_t value, int start, int length) * Returns: the sign extended value of the bit field extracted from the * input value. */ -static inline uint64_t sextract64(uint64_t value, int start, int length) +static inline int64_t sextract64(uint64_t value, int start, int length) { assert(start >= 0 && length > 0 && length <= 64 - start); /* Note that this implementation relies on right shift of signed