From patchwork Thu Nov 23 09:01:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Mackerras X-Patchwork-Id: 10072539 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 55AB66056E for ; Thu, 23 Nov 2017 09:01:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4948629CE4 for ; Thu, 23 Nov 2017 09:01:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3E41729EF6; Thu, 23 Nov 2017 09:01:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B730C29ECC for ; Thu, 23 Nov 2017 09:01:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752628AbdKWJBj (ORCPT ); Thu, 23 Nov 2017 04:01:39 -0500 Received: from ozlabs.org ([103.22.144.67]:38471 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751702AbdKWJB0 (ORCPT ); Thu, 23 Nov 2017 04:01:26 -0500 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 3yjCx0001Jz9t2c; Thu, 23 Nov 2017 20:01:23 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1511427684; bh=Wog/jSdFUxxmIro0slUwdreQ18nQ/4CNwrRQLP6NwqE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=FNKyVZSB+zjEJKRB8H/4jVq6DasC/NVwaWUMHxgBv1CSAzB0TM9jVw3JNkl958kXi hnAFzNjwmojD2gJKjpjOrlf9tdMWqR1yy0WR1Sqdc+z9A9WyXBUYBshtUTD/dciI1b adrlejDx76KjgeXLxI88evEML7MS3H+egl6L8DF4FZ+ZukU3YlHmjlro9c1AzKCB+7 rfUWMvRFOHhLjv2S1f7CIw1VtCJiYUUa9CNYlD2ryACfB1UU170fPq3IVZZNu60TiB xysvYn7hY95OQieOcpcd/jDkjGSbnzkv6b1YDPgRFSFyIyGX8BsEh4rbxQQcy0vnD1 i9sl1nX5wyGtg== From: Paul Mackerras To: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org Subject: [PATCH 2/5] KVM: PPC: Book3S HV: Fix typo in kvmppc_hv_get_dirty_log_radix() Date: Thu, 23 Nov 2017 20:01:02 +1100 Message-Id: <1511427665-21660-3-git-send-email-paulus@ozlabs.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511427665-21660-1-git-send-email-paulus@ozlabs.org> References: <1511427665-21660-1-git-send-email-paulus@ozlabs.org> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This fixes a typo where the intent was to assign to 'j' in order to skip some number of bits in the dirty bitmap for a guest. The effect of the typo is benign since it means we just iterate through all the bits rather than skipping bits which we know will be zero. This issue was found by Coverity. Signed-off-by: Paul Mackerras Reviewed-by: Darren Kenny --- arch/powerpc/kvm/book3s_64_mmu_radix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/book3s_64_mmu_radix.c b/arch/powerpc/kvm/book3s_64_mmu_radix.c index 58618f6..0c85481 100644 --- a/arch/powerpc/kvm/book3s_64_mmu_radix.c +++ b/arch/powerpc/kvm/book3s_64_mmu_radix.c @@ -573,7 +573,7 @@ long kvmppc_hv_get_dirty_log_radix(struct kvm *kvm, j = i + 1; if (npages) { set_dirty_bits(map, i, npages); - i = j + npages; + j = i + npages; } } return 0;