From patchwork Tue Feb 25 02:09:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 11402399 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 597CC930 for ; Tue, 25 Feb 2020 02:15:39 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3A52F21927 for ; Tue, 25 Feb 2020 02:15:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3A52F21927 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:47774 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6Pl4-0000oH-FK for patchwork-qemu-devel@patchwork.kernel.org; Mon, 24 Feb 2020 21:15:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38517) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6PgP-0006us-Fy for qemu-devel@nongnu.org; Mon, 24 Feb 2020 21:10:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6PgO-00088u-0l for qemu-devel@nongnu.org; Mon, 24 Feb 2020 21:10:49 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:59816 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j6PgL-0007vr-0q; Mon, 24 Feb 2020 21:10:45 -0500 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id AF84BE1648301EFB36CC; Tue, 25 Feb 2020 10:10:37 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.439.0; Tue, 25 Feb 2020 10:10:28 +0800 From: To: , Subject: [PATCH 01/13] block/stream: Remove redundant statement in stream_run() Date: Tue, 25 Feb 2020 10:09:25 +0800 Message-ID: <20200225020937.25028-2-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.14.1.windows.1 In-Reply-To: <20200225020937.25028-1-kuhn.chenqun@huawei.com> References: <20200225020937.25028-1-kuhn.chenqun@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.133.205.93] X-CFilter-Loop: Reflected X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 45.249.212.35 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , peter.maydell@linaro.org, zhang.zhanghailiang@huawei.com, qemu-block@nongnu.org, Max Reitz , Chen Qun , John Snow Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Chen Qun Clang static code analyzer show warning: block/stream.c:186:9: warning: Value stored to 'ret' is never read ret = 0; ^ ~ Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: John Snow --- Cc: John Snow Cc: Kevin Wolf Cc: Max Reitz Cc: qemu-block@nongnu.org --- block/stream.c | 1 - 1 file changed, 1 deletion(-) diff --git a/block/stream.c b/block/stream.c index 5562ccbf57..d78074ac80 100644 --- a/block/stream.c +++ b/block/stream.c @@ -183,7 +183,6 @@ static int coroutine_fn stream_run(Job *job, Error **errp) break; } } - ret = 0; /* Publish progress */ job_progress_update(&s->common.job, n); From patchwork Tue Feb 25 02:09:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 11402403 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9588014E3 for ; Tue, 25 Feb 2020 02:17:16 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 76B7E21927 for ; Tue, 25 Feb 2020 02:17:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 76B7E21927 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:47804 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6Pmd-0002rK-Ma for patchwork-qemu-devel@patchwork.kernel.org; Mon, 24 Feb 2020 21:17:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38478) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6PgO-0006ty-Sf for qemu-devel@nongnu.org; Mon, 24 Feb 2020 21:10:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6PgN-00087z-N7 for qemu-devel@nongnu.org; Mon, 24 Feb 2020 21:10:48 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:59808 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j6PgL-0007vp-0r; Mon, 24 Feb 2020 21:10:45 -0500 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id A122E5CC1DCBE591F729; Tue, 25 Feb 2020 10:10:37 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.439.0; Tue, 25 Feb 2020 10:10:29 +0800 From: To: , Subject: [PATCH 02/13] block/iscsi:Remove redundant statement in iscsi_open() Date: Tue, 25 Feb 2020 10:09:26 +0800 Message-ID: <20200225020937.25028-3-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.14.1.windows.1 In-Reply-To: <20200225020937.25028-1-kuhn.chenqun@huawei.com> References: <20200225020937.25028-1-kuhn.chenqun@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.133.205.93] X-CFilter-Loop: Reflected X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 45.249.212.35 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , peter.maydell@linaro.org, zhang.zhanghailiang@huawei.com, qemu-block@nongnu.org, Peter Lieven , Max Reitz , Ronnie Sahlberg , Chen Qun , Paolo Bonzini Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Chen Qun Clang static code analyzer show warning: block/iscsi.c:1920:9: warning: Value stored to 'flags' is never read flags &= ~BDRV_O_RDWR; ^ ~~~~~~~~~~~~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Ronnie Sahlberg Cc: Paolo Bonzini Cc: Peter Lieven Cc: Kevin Wolf Cc: Max Reitz Cc: qemu-block@nongnu.org --- block/iscsi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/block/iscsi.c b/block/iscsi.c index 682abd8e09..ed88479ede 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -1917,7 +1917,6 @@ static int iscsi_open(BlockDriverState *bs, QDict *options, int flags, if (ret < 0) { goto out; } - flags &= ~BDRV_O_RDWR; } iscsi_readcapacity_sync(iscsilun, &local_err); From patchwork Tue Feb 25 02:09:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 11402381 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3A88914E3 for ; Tue, 25 Feb 2020 02:11:58 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1BB7A21D7E for ; Tue, 25 Feb 2020 02:11:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1BB7A21D7E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:47684 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6PhV-0000jz-7h for patchwork-qemu-devel@patchwork.kernel.org; Mon, 24 Feb 2020 21:11:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38477) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6PgO-0006ts-Rz for qemu-devel@nongnu.org; Mon, 24 Feb 2020 21:10:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6PgN-00088H-Oj for qemu-devel@nongnu.org; Mon, 24 Feb 2020 21:10:48 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:59806 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j6PgL-0007vn-0o; Mon, 24 Feb 2020 21:10:45 -0500 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 98AC6616BF2A3398F797; Tue, 25 Feb 2020 10:10:37 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.439.0; Tue, 25 Feb 2020 10:10:30 +0800 From: To: , Subject: [PATCH 03/13] block/file-posix: Remove redundant statement in raw_handle_perm_lock() Date: Tue, 25 Feb 2020 10:09:27 +0800 Message-ID: <20200225020937.25028-4-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.14.1.windows.1 In-Reply-To: <20200225020937.25028-1-kuhn.chenqun@huawei.com> References: <20200225020937.25028-1-kuhn.chenqun@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.133.205.93] X-CFilter-Loop: Reflected X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 45.249.212.35 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , peter.maydell@linaro.org, zhang.zhanghailiang@huawei.com, qemu-block@nongnu.org, Max Reitz , Chen Qun Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Chen Qun Clang static code analyzer show warning: block/file-posix.c:891:9: warning: Value stored to 'op' is never read op = RAW_PL_ABORT; ^ ~~~~~~~~~~~~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Kevin Wolf Cc: Max Reitz Cc: qemu-block@nongnu.org --- block/file-posix.c | 1 - 1 file changed, 1 deletion(-) diff --git a/block/file-posix.c b/block/file-posix.c index 6345477112..0f77447a25 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -888,7 +888,6 @@ static int raw_handle_perm_lock(BlockDriverState *bs, "Is another process using the image [%s]?\n", bs->filename); } - op = RAW_PL_ABORT; /* fall through to unlock bytes. */ case RAW_PL_ABORT: raw_apply_lock_bytes(s, s->fd, s->perm, ~s->shared_perm, From patchwork Tue Feb 25 02:09:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 11402383 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 11239138D for ; Tue, 25 Feb 2020 02:12:06 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E64E121927 for ; Tue, 25 Feb 2020 02:12:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E64E121927 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:47688 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6Phd-00015r-1Y for patchwork-qemu-devel@patchwork.kernel.org; Mon, 24 Feb 2020 21:12:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38393) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6PgN-0006rF-CU for qemu-devel@nongnu.org; Mon, 24 Feb 2020 21:10:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6PgL-00084J-E7 for qemu-devel@nongnu.org; Mon, 24 Feb 2020 21:10:47 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:59814 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j6PgL-0007vq-0W; Mon, 24 Feb 2020 21:10:45 -0500 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id A8DD541B76545289C6E1; Tue, 25 Feb 2020 10:10:37 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.439.0; Tue, 25 Feb 2020 10:10:30 +0800 From: To: , Subject: [PATCH 04/13] scsi/esp-pci: Remove redundant statement in esp_pci_io_write() Date: Tue, 25 Feb 2020 10:09:28 +0800 Message-ID: <20200225020937.25028-5-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.14.1.windows.1 In-Reply-To: <20200225020937.25028-1-kuhn.chenqun@huawei.com> References: <20200225020937.25028-1-kuhn.chenqun@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.133.205.93] X-CFilter-Loop: Reflected X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 45.249.212.35 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , peter.maydell@linaro.org, Paolo Bonzini , zhang.zhanghailiang@huawei.com, Chen Qun Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Chen Qun Clang static code analyzer show warning: hw/scsi/esp-pci.c:198:9: warning: Value stored to 'size' is never read size = 4; ^ ~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Paolo Bonzini Cc: Fam Zheng --- hw/scsi/esp-pci.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/scsi/esp-pci.c b/hw/scsi/esp-pci.c index d5a1f9e017..2e6cc07d4e 100644 --- a/hw/scsi/esp-pci.c +++ b/hw/scsi/esp-pci.c @@ -195,7 +195,6 @@ static void esp_pci_io_write(void *opaque, hwaddr addr, val <<= shift; val |= current & ~(mask << shift); addr &= ~3; - size = 4; } if (addr < 0x40) { From patchwork Tue Feb 25 02:09:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 11402401 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 22DBE14E3 for ; Tue, 25 Feb 2020 02:16:17 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0479321927 for ; Tue, 25 Feb 2020 02:16:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0479321927 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:47795 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6Plg-0001sG-8S for patchwork-qemu-devel@patchwork.kernel.org; Mon, 24 Feb 2020 21:16:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38501) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6PgP-0006uI-3y for qemu-devel@nongnu.org; Mon, 24 Feb 2020 21:10:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6PgN-00088M-PN for qemu-devel@nongnu.org; Mon, 24 Feb 2020 21:10:49 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:59894 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j6PgN-00085G-Cv; Mon, 24 Feb 2020 21:10:47 -0500 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id B9A09D269BD14660E0AF; Tue, 25 Feb 2020 10:10:37 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.439.0; Tue, 25 Feb 2020 10:10:31 +0800 From: To: , Subject: [PATCH 05/13] scsi/scsi-disk: Remove redundant statement in scsi_disk_emulate_command() Date: Tue, 25 Feb 2020 10:09:29 +0800 Message-ID: <20200225020937.25028-6-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.14.1.windows.1 In-Reply-To: <20200225020937.25028-1-kuhn.chenqun@huawei.com> References: <20200225020937.25028-1-kuhn.chenqun@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.133.205.93] X-CFilter-Loop: Reflected X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 45.249.212.35 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , peter.maydell@linaro.org, Paolo Bonzini , zhang.zhanghailiang@huawei.com, Chen Qun Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Chen Qun Clang static code analyzer show warning: scsi/scsi-disk.c:1918:5: warning: Value stored to 'buflen' is never read buflen = req->cmd.xfer; ^ ~~~~~~~~~~~~~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Paolo Bonzini Cc: Fam Zheng --- hw/scsi/scsi-disk.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index 10d0794d60..1c0cb63a6f 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -1915,7 +1915,6 @@ static int32_t scsi_disk_emulate_command(SCSIRequest *req, uint8_t *buf) r->iov.iov_base = blk_blockalign(s->qdev.conf.blk, r->buflen); } - buflen = req->cmd.xfer; outbuf = r->iov.iov_base; memset(outbuf, 0, r->buflen); switch (req->cmd.buf[0]) { From patchwork Tue Feb 25 02:09:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 11402391 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DC94B138D for ; Tue, 25 Feb 2020 02:14:16 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BD7B221927 for ; Tue, 25 Feb 2020 02:14:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BD7B221927 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:47722 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6Pjj-0005hm-Tr for patchwork-qemu-devel@patchwork.kernel.org; Mon, 24 Feb 2020 21:14:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38678) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6PgS-00071q-QF for qemu-devel@nongnu.org; Mon, 24 Feb 2020 21:10:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6PgQ-0008Cd-NF for qemu-devel@nongnu.org; Mon, 24 Feb 2020 21:10:52 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:3249 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j6PgN-00085x-Nz; Mon, 24 Feb 2020 21:10:48 -0500 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id C8804C6C5159483D681F; Tue, 25 Feb 2020 10:10:42 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.439.0; Tue, 25 Feb 2020 10:10:32 +0800 From: To: , Subject: [PATCH 06/13] display/pxa2xx_lcd: Remove redundant statement in pxa2xx_palette_parse() Date: Tue, 25 Feb 2020 10:09:30 +0800 Message-ID: <20200225020937.25028-7-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.14.1.windows.1 In-Reply-To: <20200225020937.25028-1-kuhn.chenqun@huawei.com> References: <20200225020937.25028-1-kuhn.chenqun@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.133.205.93] X-CFilter-Loop: Reflected X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 45.249.212.191 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, qemu-arm@nongnu.org, zhang.zhanghailiang@huawei.com, Chen Qun Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Chen Qun Clang static code analyzer show warning: hw/display/pxa2xx_lcd.c:596:9: warning: Value stored to 'format' is never read format = 0; ^ ~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Andrzej Zaborowski Cc: Peter Maydell Cc: qemu-arm@nongnu.org --- hw/display/pxa2xx_lcd.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/display/pxa2xx_lcd.c b/hw/display/pxa2xx_lcd.c index 05f5f84671..464e93161a 100644 --- a/hw/display/pxa2xx_lcd.c +++ b/hw/display/pxa2xx_lcd.c @@ -593,7 +593,6 @@ static void pxa2xx_palette_parse(PXA2xxLCDState *s, int ch, int bpp) n = 256; break; default: - format = 0; return; } From patchwork Tue Feb 25 02:09:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 11402387 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 07B39138D for ; Tue, 25 Feb 2020 02:13:43 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DCCCD24673 for ; Tue, 25 Feb 2020 02:13:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DCCCD24673 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:47712 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6PjC-00046r-24 for patchwork-qemu-devel@patchwork.kernel.org; Mon, 24 Feb 2020 21:13:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38544) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6PgP-0006vZ-SE for qemu-devel@nongnu.org; Mon, 24 Feb 2020 21:10:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6PgO-0008A2-Mr for qemu-devel@nongnu.org; Mon, 24 Feb 2020 21:10:49 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:3246 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j6PgL-0007zV-D8; Mon, 24 Feb 2020 21:10:45 -0500 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id A2C5BDFDBD7D69E87A5D; Tue, 25 Feb 2020 10:10:42 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.439.0; Tue, 25 Feb 2020 10:10:32 +0800 From: To: , Subject: [PATCH 07/13] display/exynos4210_fimd: Remove redundant statement in exynos4210_fimd_update() Date: Tue, 25 Feb 2020 10:09:31 +0800 Message-ID: <20200225020937.25028-8-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.14.1.windows.1 In-Reply-To: <20200225020937.25028-1-kuhn.chenqun@huawei.com> References: <20200225020937.25028-1-kuhn.chenqun@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.133.205.93] X-CFilter-Loop: Reflected X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 45.249.212.191 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Igor Mitsyanko , peter.maydell@linaro.org, qemu-arm@nongnu.org, zhang.zhanghailiang@huawei.com, Chen Qun Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Chen Qun Clang static code analyzer show warning: hw/display/exynos4210_fimd.c:1313:17: warning: Value stored to 'is_dirty' is never read is_dirty = false; Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Igor Mitsyanko Cc: Peter Maydell Cc: qemu-arm@nongnu.org --- hw/display/exynos4210_fimd.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/display/exynos4210_fimd.c b/hw/display/exynos4210_fimd.c index c1071ecd46..05d3265b76 100644 --- a/hw/display/exynos4210_fimd.c +++ b/hw/display/exynos4210_fimd.c @@ -1310,7 +1310,6 @@ static void exynos4210_fimd_update(void *opaque) } host_fb_addr += inc_size; fb_line_addr += inc_size; - is_dirty = false; } g_free(snap); blend = true; From patchwork Tue Feb 25 02:09:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 11402397 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 26ABD138D for ; Tue, 25 Feb 2020 02:15:02 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 064E821927 for ; Tue, 25 Feb 2020 02:15:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 064E821927 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:47746 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6PkT-0007pP-2p for patchwork-qemu-devel@patchwork.kernel.org; Mon, 24 Feb 2020 21:15:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38495) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6PgP-0006uF-3G for qemu-devel@nongnu.org; Mon, 24 Feb 2020 21:10:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6PgN-00088g-U7 for qemu-devel@nongnu.org; Mon, 24 Feb 2020 21:10:48 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:3243 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j6PgL-0007zR-Bp; Mon, 24 Feb 2020 21:10:45 -0500 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 951B57892CD99F11857F; Tue, 25 Feb 2020 10:10:42 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.439.0; Tue, 25 Feb 2020 10:10:33 +0800 From: To: , Subject: [PATCH 08/13] display/blizzard: Remove redundant statement in blizzard_draw_line16_32() Date: Tue, 25 Feb 2020 10:09:32 +0800 Message-ID: <20200225020937.25028-9-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.14.1.windows.1 In-Reply-To: <20200225020937.25028-1-kuhn.chenqun@huawei.com> References: <20200225020937.25028-1-kuhn.chenqun@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.133.205.93] X-CFilter-Loop: Reflected X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 45.249.212.191 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, qemu-arm@nongnu.org, zhang.zhanghailiang@huawei.com, Chen Qun Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Chen Qun Clang static code analyzer show warning: hw/display/blizzard.c:940:9: warning: Value stored to 'data' is never read data >>= 5; ^ ~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Andrzej Zaborowski Cc: Peter Maydell Cc: qemu-arm@nongnu.org --- hw/display/blizzard.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/display/blizzard.c b/hw/display/blizzard.c index 359e399c2a..62517bdf75 100644 --- a/hw/display/blizzard.c +++ b/hw/display/blizzard.c @@ -937,7 +937,6 @@ static void blizzard_draw_line16_32(uint32_t *dest, g = (data & 0x3f) << 2; data >>= 6; r = (data & 0x1f) << 3; - data >>= 5; *dest++ = rgb_to_pixel32(r, g, b); } } From patchwork Tue Feb 25 02:09:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 11402395 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 10CA014E3 for ; Tue, 25 Feb 2020 02:14:52 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E58DF21927 for ; Tue, 25 Feb 2020 02:14:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E58DF21927 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:47736 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6PkJ-0007OC-2w for patchwork-qemu-devel@patchwork.kernel.org; Mon, 24 Feb 2020 21:14:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38685) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6PgS-00072T-VD for qemu-devel@nongnu.org; Mon, 24 Feb 2020 21:10:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6PgQ-0008D5-Ts for qemu-devel@nongnu.org; Mon, 24 Feb 2020 21:10:52 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:3248 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j6PgN-00085t-N9; Mon, 24 Feb 2020 21:10:48 -0500 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id C36695B1E644EC59BFDE; Tue, 25 Feb 2020 10:10:42 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.439.0; Tue, 25 Feb 2020 10:10:33 +0800 From: To: , Subject: [PATCH 09/13] dma/xlnx-zdma: Remove redundant statement in zdma_write_dst() Date: Tue, 25 Feb 2020 10:09:33 +0800 Message-ID: <20200225020937.25028-10-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.14.1.windows.1 In-Reply-To: <20200225020937.25028-1-kuhn.chenqun@huawei.com> References: <20200225020937.25028-1-kuhn.chenqun@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.133.205.93] X-CFilter-Loop: Reflected X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 45.249.212.191 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, zhang.zhanghailiang@huawei.com, Alistair Francis , qemu-arm@nongnu.org, Chen Qun , "Edgar E. Iglesias" Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Chen Qun Clang static code analyzer show warning: hw/dma/xlnx-zdma.c:399:13: warning: Value stored to 'dst_type' is never read dst_type = FIELD_EX32(s->dsc_dst.words[3], ZDMA_CH_DST_DSCR_WORD3, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Alistair Francis Cc: "Edgar E. Iglesias" Cc: Peter Maydell Cc: qemu-arm@nongnu.org --- hw/dma/xlnx-zdma.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/dma/xlnx-zdma.c b/hw/dma/xlnx-zdma.c index 8fb83f5b07..45355c5d59 100644 --- a/hw/dma/xlnx-zdma.c +++ b/hw/dma/xlnx-zdma.c @@ -396,8 +396,6 @@ static void zdma_write_dst(XlnxZDMA *s, uint8_t *buf, uint32_t len) zdma_load_descriptor(s, next, &s->dsc_dst); dst_size = FIELD_EX32(s->dsc_dst.words[2], ZDMA_CH_DST_DSCR_WORD2, SIZE); - dst_type = FIELD_EX32(s->dsc_dst.words[3], ZDMA_CH_DST_DSCR_WORD3, - TYPE); } /* Match what hardware does by ignoring the dst_size and only using From patchwork Tue Feb 25 02:09:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 11402385 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 83AD514E3 for ; Tue, 25 Feb 2020 02:12:42 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6499321927 for ; Tue, 25 Feb 2020 02:12:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6499321927 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:47698 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6PiD-0002Sv-HA for patchwork-qemu-devel@patchwork.kernel.org; Mon, 24 Feb 2020 21:12:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38367) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6PgM-0006qk-TF for qemu-devel@nongnu.org; Mon, 24 Feb 2020 21:10:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6PgL-00084i-Mt for qemu-devel@nongnu.org; Mon, 24 Feb 2020 21:10:46 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:3244 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j6PgL-0007zT-AK; Mon, 24 Feb 2020 21:10:45 -0500 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 99A35544E8D56BA7C4C5; Tue, 25 Feb 2020 10:10:42 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.439.0; Tue, 25 Feb 2020 10:10:34 +0800 From: To: , Subject: [PATCH 10/13] migration/vmstate: Remove redundant statement in vmstate_save_state_v() Date: Tue, 25 Feb 2020 10:09:34 +0800 Message-ID: <20200225020937.25028-11-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.14.1.windows.1 In-Reply-To: <20200225020937.25028-1-kuhn.chenqun@huawei.com> References: <20200225020937.25028-1-kuhn.chenqun@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.133.205.93] X-CFilter-Loop: Reflected X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 45.249.212.191 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Juan Quintela , zhang.zhanghailiang@huawei.com, "Dr. David Alan Gilbert" , Chen Qun Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Chen Qun The "ret" has been assigned in all branches. It didn't need to be assigned separately. Clang static code analyzer show warning: migration/vmstate.c:365:17: warning: Value stored to 'ret' is never read ret = 0; ^ ~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Juan Quintela Cc: "Dr. David Alan Gilbert" --- migration/vmstate.c | 1 - 1 file changed, 1 deletion(-) diff --git a/migration/vmstate.c b/migration/vmstate.c index 7dd8ef66c6..bafa890384 100644 --- a/migration/vmstate.c +++ b/migration/vmstate.c @@ -362,7 +362,6 @@ int vmstate_save_state_v(QEMUFile *f, const VMStateDescription *vmsd, } for (i = 0; i < n_elems; i++) { void *curr_elem = first_elem + size * i; - ret = 0; vmsd_desc_field_start(vmsd, vmdesc_loop, field, i, n_elems); old_offset = qemu_ftell_fast(f); From patchwork Tue Feb 25 02:09:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 11402405 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 72E26930 for ; Tue, 25 Feb 2020 02:19:36 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 537A721927 for ; Tue, 25 Feb 2020 02:19:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 537A721927 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:47830 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6Pot-0004mM-Jp for patchwork-qemu-devel@patchwork.kernel.org; Mon, 24 Feb 2020 21:19:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38650) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6PgR-0006zb-W1 for qemu-devel@nongnu.org; Mon, 24 Feb 2020 21:10:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6PgQ-0008D1-Tn for qemu-devel@nongnu.org; Mon, 24 Feb 2020 21:10:51 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:3247 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j6PgN-00085s-KB; Mon, 24 Feb 2020 21:10:47 -0500 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id A78BD7B223F2D41E97D7; Tue, 25 Feb 2020 10:10:42 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.439.0; Tue, 25 Feb 2020 10:10:34 +0800 From: To: , Subject: [PATCH 11/13] timer/exynos4210_mct: Remove redundant statement in exynos4210_mct_write() Date: Tue, 25 Feb 2020 10:09:35 +0800 Message-ID: <20200225020937.25028-12-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.14.1.windows.1 In-Reply-To: <20200225020937.25028-1-kuhn.chenqun@huawei.com> References: <20200225020937.25028-1-kuhn.chenqun@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.133.205.93] X-CFilter-Loop: Reflected X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 45.249.212.191 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Igor Mitsyanko , peter.maydell@linaro.org, qemu-arm@nongnu.org, zhang.zhanghailiang@huawei.com, Chen Qun Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Chen Qun Clang static code analyzer show warning: hw/timer/exynos4210_mct.c:1370:9: warning: Value stored to 'index' is never read index = GET_L_TIMER_CNT_REG_IDX(offset, lt_i); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ hw/timer/exynos4210_mct.c:1399:9: warning: Value stored to 'index' is never read index = GET_L_TIMER_CNT_REG_IDX(offset, lt_i); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ hw/timer/exynos4210_mct.c:1441:9: warning: Value stored to 'index' is never read index = GET_L_TIMER_CNT_REG_IDX(offset, lt_i); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Igor Mitsyanko Cc: Peter Maydell Cc: qemu-arm@nongnu.org --- hw/timer/exynos4210_mct.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/hw/timer/exynos4210_mct.c b/hw/timer/exynos4210_mct.c index 944120aea5..570cf7075b 100644 --- a/hw/timer/exynos4210_mct.c +++ b/hw/timer/exynos4210_mct.c @@ -1367,7 +1367,6 @@ static void exynos4210_mct_write(void *opaque, hwaddr offset, case L0_TCNTB: case L1_TCNTB: lt_i = GET_L_TIMER_IDX(offset); - index = GET_L_TIMER_CNT_REG_IDX(offset, lt_i); /* * TCNTB is updated to internal register only after CNT expired. @@ -1396,7 +1395,6 @@ static void exynos4210_mct_write(void *opaque, hwaddr offset, case L0_ICNTB: case L1_ICNTB: lt_i = GET_L_TIMER_IDX(offset); - index = GET_L_TIMER_CNT_REG_IDX(offset, lt_i); s->l_timer[lt_i].reg.wstat |= L_WSTAT_ICNTB_WRITE; s->l_timer[lt_i].reg.cnt[L_REG_CNT_ICNTB] = value & @@ -1438,8 +1436,6 @@ static void exynos4210_mct_write(void *opaque, hwaddr offset, case L0_FRCNTB: case L1_FRCNTB: lt_i = GET_L_TIMER_IDX(offset); - index = GET_L_TIMER_CNT_REG_IDX(offset, lt_i); - DPRINTF("local timer[%d] FRCNTB write %llx\n", lt_i, value); s->l_timer[lt_i].reg.wstat |= L_WSTAT_FRCCNTB_WRITE; From patchwork Tue Feb 25 02:09:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 11402389 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C3E54138D for ; Tue, 25 Feb 2020 02:13:49 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A4E8621927 for ; Tue, 25 Feb 2020 02:13:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A4E8621927 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:47720 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6PjI-0004Sp-Pv for patchwork-qemu-devel@patchwork.kernel.org; Mon, 24 Feb 2020 21:13:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38409) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6PgN-0006rR-Gr for qemu-devel@nongnu.org; Mon, 24 Feb 2020 21:10:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6PgL-00085A-RB for qemu-devel@nongnu.org; Mon, 24 Feb 2020 21:10:47 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:3242 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j6PgL-0007zQ-D6; Mon, 24 Feb 2020 21:10:45 -0500 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 9018B2E2D7E06BA90EA8; Tue, 25 Feb 2020 10:10:42 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.439.0; Tue, 25 Feb 2020 10:10:35 +0800 From: To: , Subject: [PATCH 12/13] usb/hcd-ehci: Remove redundant statements Date: Tue, 25 Feb 2020 10:09:36 +0800 Message-ID: <20200225020937.25028-13-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.14.1.windows.1 In-Reply-To: <20200225020937.25028-1-kuhn.chenqun@huawei.com> References: <20200225020937.25028-1-kuhn.chenqun@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.133.205.93] X-CFilter-Loop: Reflected X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 45.249.212.191 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Gerd Hoffmann , zhang.zhanghailiang@huawei.com, Chen Qun Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Chen Qun The "again" assignment is meaningless before g_assert_not_reached. In addition, the break statements no longer needs to be after g_assert_not_reached. Clang static code analyzer show warning: hw/usb/hcd-ehci.c:2108:13: warning: Value stored to 'again' is never read again = -1; ^ ~~ Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: Philippe Mathieu-Daudé --- Cc: Gerd Hoffmann --- hw/usb/hcd-ehci.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index 56ab2f457f..29d49c2d7e 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/usb/hcd-ehci.c @@ -1301,7 +1301,6 @@ static void ehci_execute_complete(EHCIQueue *q) /* should not be triggerable */ fprintf(stderr, "USB invalid response %d\n", p->packet.status); g_assert_not_reached(); - break; } /* TODO check 4.12 for splits */ @@ -2105,9 +2104,7 @@ static void ehci_advance_state(EHCIState *ehci, int async) default: fprintf(stderr, "Bad state!\n"); - again = -1; g_assert_not_reached(); - break; } if (again < 0 || itd_count > 16) { From patchwork Tue Feb 25 02:09:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 11402393 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 407BB14E3 for ; Tue, 25 Feb 2020 02:14:22 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 21E6F21927 for ; Tue, 25 Feb 2020 02:14:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 21E6F21927 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:47728 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6Pjp-0005v0-8F for patchwork-qemu-devel@patchwork.kernel.org; Mon, 24 Feb 2020 21:14:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38375) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6PgN-0006qr-0B for qemu-devel@nongnu.org; Mon, 24 Feb 2020 21:10:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6PgL-00084z-QQ for qemu-devel@nongnu.org; Mon, 24 Feb 2020 21:10:46 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:3245 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j6PgL-0007zU-CX; Mon, 24 Feb 2020 21:10:45 -0500 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 9E7248434096C9F3081A; Tue, 25 Feb 2020 10:10:42 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.439.0; Tue, 25 Feb 2020 10:10:35 +0800 From: To: , Subject: [PATCH 13/13] monitor/hmp-cmds: Remove redundant statement in hmp_rocker_of_dpa_groups() Date: Tue, 25 Feb 2020 10:09:37 +0800 Message-ID: <20200225020937.25028-14-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.14.1.windows.1 In-Reply-To: <20200225020937.25028-1-kuhn.chenqun@huawei.com> References: <20200225020937.25028-1-kuhn.chenqun@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.133.205.93] X-CFilter-Loop: Reflected X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 45.249.212.191 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, zhang.zhanghailiang@huawei.com, "Dr. David Alan Gilbert" , Chen Qun Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Chen Qun Clang static code analyzer show warning: monitor/hmp-cmds.c:2867:17: warning: Value stored to 'set' is never read set = true; ^ ~~~~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: "Dr. David Alan Gilbert" --- monitor/hmp-cmds.c | 1 - 1 file changed, 1 deletion(-) diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index 53bc3f76c4..84f94647cd 100644 --- a/monitor/hmp-cmds.c +++ b/monitor/hmp-cmds.c @@ -2864,7 +2864,6 @@ void hmp_rocker_of_dpa_groups(Monitor *mon, const QDict *qdict) if (group->has_set_eth_dst) { if (!set) { - set = true; monitor_printf(mon, " set"); } monitor_printf(mon, " dst %s", group->set_eth_dst);