Message ID | 1434389098-13430-5-git-send-email-peter.maydell@linaro.org |
---|---|
State | Accepted |
Commit | 644ead5be1a851abff16886240c5c6fc1c5137c0 |
Headers | show
Return-Path: <patchwork-forward+bncBC6Z756YVMIBBMU67SVQKGQEJJEHNZI@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B86BC211FD for <linaro@patches.linaro.org>; Mon, 15 Jun 2015 17:45:23 +0000 (UTC) Received: by wifx6 with SMTP id x6sf23073453wif.1 for <linaro@patches.linaro.org>; Mon, 15 Jun 2015 10:45:23 -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=0b6OVTqVUfBrFxIsSwpKYUqq06v8bVZ5EVkvLOS1bPU=; b=hQ86ahNI7X9rP7POAgCYlZKYN723+Y1FbU6vh8xjzLY61+LartYJhZYb38vbd56B/T 7dCTejwX+z1nZkGsRHaapoNbWPncO3e/NrYU7zYBV7Eumdejw0GqWHYlun2xbqRcVS5I yXyCOhT3MQxQ2xcnU9EI+6h9lh45mrU6hS8y7K0yR9HyIYZA25ml/eXcB7UNkicZxTsV qsfidSYaNbZsWUxDyYOfpIkpJyiMk+EZWupWcyccS06fqfG0sJN4fIxarSbls/ivLjlS PDraT0GjGTbZixWugCLl7PfTP9jHlAiU2/1PtRjb3L0JB5cn7/7KkViF46dZSB4SRMjL LibQ== X-Gm-Message-State: ALoCoQkWVMv4E5H+e+NEqG/mxDaMMEOUq2IVVNfEwa7o0oJHbYPRuEroBSQtnXjevVb62B09wUf/ X-Received: by 10.194.175.36 with SMTP id bx4mr30761372wjc.1.1434390323015; Mon, 15 Jun 2015 10:45:23 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.100 with SMTP id j4ls919547lah.92.gmail; Mon, 15 Jun 2015 10:45:22 -0700 (PDT) X-Received: by 10.112.219.70 with SMTP id pm6mr1289101lbc.41.1434390322717; Mon, 15 Jun 2015 10:45:22 -0700 (PDT) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id jx2si11017891lbc.124.2015.06.15.10.45.22 for <patchwork-forward@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Jun 2015 10:45:22 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by lbbti3 with SMTP id ti3so20805576lbb.1 for <patchwork-forward@linaro.org>; Mon, 15 Jun 2015 10:45:22 -0700 (PDT) X-Received: by 10.112.140.231 with SMTP id rj7mr1326770lbb.76.1434390322467; Mon, 15 Jun 2015 10:45:22 -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.108.230 with SMTP id hn6csp1573142lbb; Mon, 15 Jun 2015 10:45:21 -0700 (PDT) X-Received: by 10.140.48.129 with SMTP id o1mr36845768qga.21.1434390321157; Mon, 15 Jun 2015 10:45:21 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [208.118.235.17]) by mx.google.com with ESMTPS id 91si13490554qks.92.2015.06.15.10.45.18 for <patch@linaro.org> (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 15 Jun 2015 10:45:21 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; Received: from localhost ([::1]:35798 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1Z4YRi-0008G1-LS for patch@linaro.org; Mon, 15 Jun 2015 13:45:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32795) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <pm215@archaic.org.uk>) id 1Z4Y8K-0007mt-TC for qemu-devel@nongnu.org; Mon, 15 Jun 2015 13:25:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <pm215@archaic.org.uk>) id 1Z4Y8J-0001YM-9k for qemu-devel@nongnu.org; Mon, 15 Jun 2015 13:25:16 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:34471) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <pm215@archaic.org.uk>) id 1Z4Y8J-0001AA-1V for qemu-devel@nongnu.org; Mon, 15 Jun 2015 13:25:15 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from <pm215@archaic.org.uk>) id 1Z4Y82-0003VT-FV for qemu-devel@nongnu.org; Mon, 15 Jun 2015 18:24:58 +0100 From: Peter Maydell <peter.maydell@linaro.org> To: qemu-devel@nongnu.org Date: Mon, 15 Jun 2015 18:24:34 +0100 Message-Id: <1434389098-13430-5-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1434389098-13430-1-git-send-email-peter.maydell@linaro.org> References: <1434389098-13430-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 04/28] hw/display/exynos4210_fimd: Fix bit-swapping code X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: <patchwork-forward.linaro.org> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=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.217.182 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 |
diff --git a/hw/display/exynos4210_fimd.c b/hw/display/exynos4210_fimd.c index 72b3a1d..603ef50 100644 --- a/hw/display/exynos4210_fimd.c +++ b/hw/display/exynos4210_fimd.c @@ -337,7 +337,7 @@ static inline void fimd_swap_data(unsigned int swap_ctl, uint64_t *data) if (swap_ctl & FIMD_WINCON_SWAP_BITS) { res = 0; for (i = 0; i < 64; i++) { - if (x & (1ULL << (64 - i))) { + if (x & (1ULL << (63 - i))) { res |= (1ULL << i); } }
fimd_swap_data() includes code to reverse the bits in a 64-bit integer, but an off-by-one error meant that it would try to shift off the top of the integer. Correct the bug (spotted by Coverity). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1432912615-23107-1-git-send-email-peter.maydell@linaro.org --- hw/display/exynos4210_fimd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)