From patchwork Tue Jan 24 09:39:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 92333 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1649496qgi; Tue, 24 Jan 2017 02:46:17 -0800 (PST) X-Received: by 10.55.102.17 with SMTP id a17mr13966202qkc.277.1485254777243; Tue, 24 Jan 2017 02:46:17 -0800 (PST) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id v201si12857600qka.33.2017.01.24.02.46.16 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 24 Jan 2017 02:46:17 -0800 (PST) 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; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Received: from localhost ([::1]:47603 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVycA-0004IF-MG for patch@linaro.org; Tue, 24 Jan 2017 05:46:14 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45275) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVxoU-0001g3-FE for qemu-devel@nongnu.org; Tue, 24 Jan 2017 04:54:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cVxoQ-0005iq-Et for qemu-devel@nongnu.org; Tue, 24 Jan 2017 04:54:54 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:36317) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVxoQ-0005iR-7s; Tue, 24 Jan 2017 04:54:50 -0500 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id F1CA9420AB; Tue, 24 Jan 2017 12:54:47 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.tls.msk.ru (Postfix) with SMTP id A6A99560; Tue, 24 Jan 2017 12:39:42 +0300 (MSK) Received: (nullmailer pid 12614 invoked by uid 1000); Tue, 24 Jan 2017 09:39:41 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Tue, 24 Jan 2017 12:39:07 +0300 Message-Id: <7f473c284e9811e3ac5dfcae1f858bac5ade1066.1485250702.git.mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 86.62.121.231 Subject: [Qemu-devel] [PULL 03/31] README: Add linux to macOS build info X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Peter Maydell , Michael Tokarev Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell The README lists the URLs for the wiki pages describing how to build on Linux and Windows; add the equivalent link for building on macOS. Signed-off-by: Peter Maydell Signed-off-by: Michael Tokarev --- README | 1 + 1 file changed, 1 insertion(+) -- 2.1.4 diff --git a/README b/README index bd8060a..cb60d05 100644 --- a/README +++ b/README @@ -45,6 +45,7 @@ of other UNIX targets. The simple steps to build QEMU are: Additional information can also be found online via the QEMU website: http://qemu-project.org/Hosts/Linux + http://qemu-project.org/Hosts/Mac http://qemu-project.org/Hosts/W32 From patchwork Tue Jan 24 09:39:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 92318 Delivered-To: patch@linaro.org Received: by 10.182.3.34 with SMTP id 2csp1622489obz; Tue, 24 Jan 2017 02:13:49 -0800 (PST) X-Received: by 10.55.180.5 with SMTP id d5mr28955664qkf.266.1485252829438; Tue, 24 Jan 2017 02:13:49 -0800 (PST) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id l33si12795758qtl.327.2017.01.24.02.13.49 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 24 Jan 2017 02:13:49 -0800 (PST) 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; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Received: from localhost ([::1]:47379 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVy6k-0000ru-W2 for patch@linaro.org; Tue, 24 Jan 2017 05:13:47 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42414) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVxem-00021H-JU for qemu-devel@nongnu.org; Tue, 24 Jan 2017 04:44:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cVxei-0002cb-Ix for qemu-devel@nongnu.org; Tue, 24 Jan 2017 04:44:52 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:43729) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVxei-0002cM-By; Tue, 24 Jan 2017 04:44:48 -0500 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 115A842102; Tue, 24 Jan 2017 12:44:48 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.tls.msk.ru (Postfix) with SMTP id D7CA8572; Tue, 24 Jan 2017 12:39:43 +0300 (MSK) Received: (nullmailer pid 12643 invoked by uid 1000); Tue, 24 Jan 2017 09:39:41 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Tue, 24 Jan 2017 12:39:21 +0300 Message-Id: <7d628e2c05e0fd2da04f618ba41068a7c11b2a7d.1485250702.git.mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 86.62.121.231 Subject: [Qemu-devel] [PULL 17/31] hw/i386/kvmvapic: Remove dead code in patch_hypercalls() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Peter Maydell , Michael Tokarev Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell The patch_hypercalls() function sets up a 'patches' variable and checks it at the end of the function, but never modifies it in the middle. Remove this dead code, which seems to have been present since the function was added in commit e5ad936b0fd7 in 2012. (Spotted by Coverity: CID 1005581.) Signed-off-by: Peter Maydell Acked-by: Jan Kiszka Signed-off-by: Michael Tokarev --- hw/i386/kvmvapic.c | 6 ------ 1 file changed, 6 deletions(-) -- 2.1.4 diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c index 2f767b6..702e281 100644 --- a/hw/i386/kvmvapic.c +++ b/hw/i386/kvmvapic.c @@ -535,7 +535,6 @@ static int patch_hypercalls(VAPICROMState *s) uint8_t alternates[2]; const uint8_t *pattern; const uint8_t *patch; - int patches = 0; off_t pos; uint8_t *rom; @@ -566,11 +565,6 @@ static int patch_hypercalls(VAPICROMState *s) } g_free(rom); - - if (patches != 0 && patches != 2) { - return -1; - } - return 0; } From patchwork Tue Jan 24 09:39:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 92337 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1665653qgi; Tue, 24 Jan 2017 03:30:53 -0800 (PST) X-Received: by 10.55.102.17 with SMTP id a17mr14118440qkc.277.1485257452966; Tue, 24 Jan 2017 03:30:52 -0800 (PST) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id k54si12945633qtb.83.2017.01.24.03.30.52 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 24 Jan 2017 03:30:52 -0800 (PST) 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; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Received: from localhost ([::1]:47908 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVzJK-0002Mi-Fi for patch@linaro.org; Tue, 24 Jan 2017 06:30:50 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58805) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVykY-0004pg-BY for qemu-devel@nongnu.org; Tue, 24 Jan 2017 05:54:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cVykU-0006Sk-Dr for qemu-devel@nongnu.org; Tue, 24 Jan 2017 05:54:54 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:36527) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVykU-0006SR-72; Tue, 24 Jan 2017 05:54:50 -0500 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 9D0AF4211B; Tue, 24 Jan 2017 13:54:48 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.tls.msk.ru (Postfix) with SMTP id 45AC658A; Tue, 24 Jan 2017 12:39:44 +0300 (MSK) Received: (nullmailer pid 12645 invoked by uid 1000); Tue, 24 Jan 2017 09:39:41 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Tue, 24 Jan 2017 12:39:22 +0300 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 86.62.121.231 Subject: [Qemu-devel] [PULL 18/31] lm32: milkymist-tmu2: fix another integer overflow X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Peter Maydell , Michael Tokarev Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell Don't truncate the multiplication and do a 64 bit one instead because the result is stored in a 64 bit variable. This fixes a similar coverity warning to commit 237a8650d640, in a similar way, and is the other half of the fix for coverity CID 1167561. Signed-off-by: Peter Maydell Acked-by: Michael Walle Signed-off-by: Michael Tokarev --- hw/display/milkymist-tmu2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.1.4 diff --git a/hw/display/milkymist-tmu2.c b/hw/display/milkymist-tmu2.c index 5c666f9..920374b 100644 --- a/hw/display/milkymist-tmu2.c +++ b/hw/display/milkymist-tmu2.c @@ -257,7 +257,7 @@ static void tmu2_start(MilkymistTMU2State *s) glColor4f(m, m, m, (float)(s->regs[R_ALPHA] + 1) / 64.0f); /* Read the QEMU dest. framebuffer into the OpenGL framebuffer */ - fb_len = 2 * s->regs[R_DSTHRES] * s->regs[R_DSTVRES]; + fb_len = 2ULL * s->regs[R_DSTHRES] * s->regs[R_DSTVRES]; fb = cpu_physical_memory_map(s->regs[R_DSTFBUF], &fb_len, 0); if (fb == NULL) { glDeleteTextures(1, &texture); From patchwork Tue Jan 24 09:39:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 92328 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1643463qgi; Tue, 24 Jan 2017 02:27:13 -0800 (PST) X-Received: by 10.237.60.122 with SMTP id u55mr27404547qte.41.1485253633197; Tue, 24 Jan 2017 02:27:13 -0800 (PST) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id d12si12814056qtg.321.2017.01.24.02.27.12 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 24 Jan 2017 02:27:13 -0800 (PST) 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; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Received: from localhost ([::1]:47475 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVyJi-00041H-LF for patch@linaro.org; Tue, 24 Jan 2017 05:27:10 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45273) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVxoU-0001g1-Ee for qemu-devel@nongnu.org; Tue, 24 Jan 2017 04:54:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cVxoQ-0005j6-Gt for qemu-devel@nongnu.org; Tue, 24 Jan 2017 04:54:54 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:37948) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVxoQ-0005iV-8G; Tue, 24 Jan 2017 04:54:50 -0500 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 20E5E42108; Tue, 24 Jan 2017 12:54:48 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.tls.msk.ru (Postfix) with SMTP id 334B5589; Tue, 24 Jan 2017 12:39:44 +0300 (MSK) Received: (nullmailer pid 12647 invoked by uid 1000); Tue, 24 Jan 2017 09:39:41 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Tue, 24 Jan 2017 12:39:23 +0300 Message-Id: <95d294e069dcfcde3ddeb0a965c8258f98f7dbe6.1485250702.git.mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 86.62.121.231 Subject: [Qemu-devel] [PULL 19/31] disas/cris.c: Fix Coverity warning about unchecked NULL X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Peter Maydell , Michael Tokarev Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell Coverity (CID 1005689) warns that we don't check that spec_reg_info() returned non-NULL before dereferencing. Add the check, though as the comment notes this is a can't-really-happen case because the earlier constraint matching should have ruled out the "unknown reg" case. Signed-off-by: Peter Maydell Reviewed-by: Edgar E. Iglesias Signed-off-by: Michael Tokarev --- disas/cris.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.1.4 diff --git a/disas/cris.c b/disas/cris.c index 08161d1..8a1daf9 100644 --- a/disas/cris.c +++ b/disas/cris.c @@ -2490,7 +2490,7 @@ print_with_operands (const struct cris_opcode *opcodep, const struct cris_spec_reg *sregp = spec_reg_info ((insn >> 12) & 15, disdata->distype); - if (sregp->name == NULL) + if (sregp == NULL || sregp->name == NULL) /* Should have been caught as a non-match earlier. */ *tp++ = '?'; else From patchwork Tue Jan 24 09:39:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 92326 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1642222qgi; Tue, 24 Jan 2017 02:22:51 -0800 (PST) X-Received: by 10.237.55.97 with SMTP id i88mr29422612qtb.143.1485253371435; Tue, 24 Jan 2017 02:22:51 -0800 (PST) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id n124si3623319qkc.192.2017.01.24.02.22.51 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 24 Jan 2017 02:22:51 -0800 (PST) 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; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Received: from localhost ([::1]:47446 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVyFU-0008QR-WF for patch@linaro.org; Tue, 24 Jan 2017 05:22:49 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVxoU-0001g2-En for qemu-devel@nongnu.org; Tue, 24 Jan 2017 04:54:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cVxoQ-0005j1-G8 for qemu-devel@nongnu.org; Tue, 24 Jan 2017 04:54:54 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:53181) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVxoQ-0005iU-84; Tue, 24 Jan 2017 04:54:50 -0500 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 0028F42105; Tue, 24 Jan 2017 12:54:47 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.tls.msk.ru (Postfix) with SMTP id A7AAD570; Tue, 24 Jan 2017 12:39:43 +0300 (MSK) Received: (nullmailer pid 12659 invoked by uid 1000); Tue, 24 Jan 2017 09:39:41 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Tue, 24 Jan 2017 12:39:29 +0300 Message-Id: <05a23aeae1dc56b7f26c1a348fd6d31790f6baa6.1485250702.git.mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 86.62.121.231 Subject: [Qemu-devel] [PULL 25/31] hw/display/framebuffer.c: Avoid overflow for framebuffers > 4GB X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Peter Maydell , Michael Tokarev Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell Coverity points out that calculating src_len by multiplying src_width by rows could overflow. This can only happen in the implausible case of a framebuffer larger than 4GB, but we may as well fix it, placating Coverity. (CID1005515) Signed-off-by: Peter Maydell Signed-off-by: Michael Tokarev --- hw/display/framebuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.1.4 diff --git a/hw/display/framebuffer.c b/hw/display/framebuffer.c index df51358..25aa46c 100644 --- a/hw/display/framebuffer.c +++ b/hw/display/framebuffer.c @@ -78,7 +78,7 @@ void framebuffer_update_display( i = *first_row; *first_row = -1; - src_len = src_width * rows; + src_len = (hwaddr)src_width * rows; mem = mem_section->mr; if (!mem) { From patchwork Tue Jan 24 09:39:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 92335 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1655534qgi; Tue, 24 Jan 2017 03:03:46 -0800 (PST) X-Received: by 10.200.55.112 with SMTP id p45mr29639999qtb.278.1485255826776; Tue, 24 Jan 2017 03:03:46 -0800 (PST) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id u34si12889737qta.88.2017.01.24.03.03.46 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 24 Jan 2017 03:03:46 -0800 (PST) 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; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Received: from localhost ([::1]:47721 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVyt6-00033j-CV for patch@linaro.org; Tue, 24 Jan 2017 06:03:44 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50707) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVy7o-0002ig-7F for qemu-devel@nongnu.org; Tue, 24 Jan 2017 05:14:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cVy7l-0002am-Hy for qemu-devel@nongnu.org; Tue, 24 Jan 2017 05:14:52 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:58699) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVy7l-0002Zp-Aq; Tue, 24 Jan 2017 05:14:49 -0500 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 878A54210B; Tue, 24 Jan 2017 13:14:48 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.tls.msk.ru (Postfix) with SMTP id 7B4DC58D; Tue, 24 Jan 2017 12:39:44 +0300 (MSK) Received: (nullmailer pid 12663 invoked by uid 1000); Tue, 24 Jan 2017 09:39:41 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Tue, 24 Jan 2017 12:39:31 +0300 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 86.62.121.231 Subject: [Qemu-devel] [PULL 27/31] scsi-disk: add 'fall through' comment to switch VERIFY cases X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Peter Maydell , Michael Tokarev Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell Commit 166dbda7e131 added some extra cases to a switch() such that the existing code is intended to fall through the new case statements. It's clear from the commit that this is intentional, but less clear to subsequent readers of the code, and not clear at all to static analysis tools like Coverity. Add a /* fall through */ comment to indicate the intent. (Fixes CID 1368287.) Signed-off-by: Peter Maydell Signed-off-by: Michael Tokarev --- hw/scsi/scsi-disk.c | 1 + 1 file changed, 1 insertion(+) -- 2.1.4 diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index c080888..cc06fe5 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -2157,6 +2157,7 @@ static int32_t scsi_disk_dma_command(SCSIRequest *req, uint8_t *buf) DPRINTF("Write %s(sector %" PRId64 ", count %u)\n", (command & 0xe) == 0xe ? "And Verify " : "", r->req.cmd.lba, len); + /* fall through */ case VERIFY_10: case VERIFY_12: case VERIFY_16: