From patchwork Wed Feb 26 08:46: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: 1244784 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=huawei.com 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 ozlabs.org (Postfix) with ESMTPS id 48S8b335kWz9sRJ for ; Wed, 26 Feb 2020 19:48:15 +1100 (AEDT) Received: from localhost ([::1]:39970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6sMX-0000Qf-AR for incoming@patchwork.ozlabs.org; Wed, 26 Feb 2020 03:48:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44462) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6sM3-0000OZ-Ms for qemu-devel@nongnu.org; Wed, 26 Feb 2020 03:47:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6sM2-0007Lh-Lz for qemu-devel@nongnu.org; Wed, 26 Feb 2020 03:47:43 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:58664 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j6sM2-00075o-AO; Wed, 26 Feb 2020 03:47:42 -0500 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 755008786A96DFFF0423; Wed, 26 Feb 2020 16:47:37 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.439.0; Wed, 26 Feb 2020 16:47:30 +0800 From: To: , Subject: [PATCH v2 01/13] block/stream: Remove redundant statement in stream_run() Date: Wed, 26 Feb 2020 16:46:35 +0800 Message-ID: <20200226084647.20636-2-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200226084647.20636-1-kuhn.chenqun@huawei.com> References: <20200226084647.20636-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.32 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, Max Reitz , Euler Robot , Chen Qun , John Snow Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 Reviewed-by: Kevin Wolf --- Cc: John Snow Cc: Kevin Wolf Cc: Max Reitz --- 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 Wed Feb 26 08:46:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 1244782 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=huawei.com 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 ozlabs.org (Postfix) with ESMTPS id 48S8b26rgzz9sNg for ; Wed, 26 Feb 2020 19:48:14 +1100 (AEDT) Received: from localhost ([::1]:39960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6sMV-0000Oy-Tf for incoming@patchwork.ozlabs.org; Wed, 26 Feb 2020 03:48:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44455) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6sM3-0000OX-Fa for qemu-devel@nongnu.org; Wed, 26 Feb 2020 03:47:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6sM2-0007Ka-GI for qemu-devel@nongnu.org; Wed, 26 Feb 2020 03:47:43 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:58666 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j6sM2-00075r-44; Wed, 26 Feb 2020 03:47:42 -0500 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 7AAE71286B2955C92B63; Wed, 26 Feb 2020 16:47:37 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.439.0; Wed, 26 Feb 2020 16:47:31 +0800 From: To: , Subject: [PATCH v2 02/13] block/iscsi:Remove redundant statement in iscsi_open() Date: Wed, 26 Feb 2020 16:46:36 +0800 Message-ID: <20200226084647.20636-3-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200226084647.20636-1-kuhn.chenqun@huawei.com> References: <20200226084647.20636-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.32 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, Chen Qun , Peter Lieven , Max Reitz , Ronnie Sahlberg , Euler Robot , Paolo Bonzini Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 --- 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 Wed Feb 26 08:46: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: 1244789 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=huawei.com 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 ozlabs.org (Postfix) with ESMTPS id 48S8dk3V0Mz9sNg for ; Wed, 26 Feb 2020 19:50:34 +1100 (AEDT) Received: from localhost ([::1]:40044 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6sOm-0004OS-7Q for incoming@patchwork.ozlabs.org; Wed, 26 Feb 2020 03:50:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44566) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6sM6-0000Ot-0Y for qemu-devel@nongnu.org; Wed, 26 Feb 2020 03:47:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6sM4-0007U5-T6 for qemu-devel@nongnu.org; Wed, 26 Feb 2020 03:47:45 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:58922 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j6sM4-0007Mg-G3; Wed, 26 Feb 2020 03:47:44 -0500 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 619DE51D9CD8B5E24CD; Wed, 26 Feb 2020 16:47:42 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.439.0; Wed, 26 Feb 2020 16:47:31 +0800 From: To: , Subject: [PATCH v2 03/13] block/file-posix: Remove redundant statement in raw_handle_perm_lock() Date: Wed, 26 Feb 2020 16:46:37 +0800 Message-ID: <20200226084647.20636-4-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200226084647.20636-1-kuhn.chenqun@huawei.com> References: <20200226084647.20636-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.32 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, Max Reitz , Euler Robot , Chen Qun Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 Reviewed-by: Kevin Wolf --- Cc: Kevin Wolf Cc: Max Reitz --- 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 Wed Feb 26 08:46:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 1244790 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=huawei.com 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 ozlabs.org (Postfix) with ESMTPS id 48S8gl3Q1wz9sNg for ; Wed, 26 Feb 2020 19:52:19 +1100 (AEDT) Received: from localhost ([::1]:40080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6sQS-0007qv-TE for incoming@patchwork.ozlabs.org; Wed, 26 Feb 2020 03:52:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44696) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6sM8-0000St-9U for qemu-devel@nongnu.org; Wed, 26 Feb 2020 03:47:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6sM5-0007ZG-W1 for qemu-devel@nongnu.org; Wed, 26 Feb 2020 03:47:48 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:3168 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j6sM5-0007Nq-Io; Wed, 26 Feb 2020 03:47:45 -0500 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 8E58772E53651F266B31; Wed, 26 Feb 2020 16:47:42 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.439.0; Wed, 26 Feb 2020 16:47:32 +0800 From: To: , Subject: [PATCH v2 04/13] scsi/esp-pci: Remove redundant statement in esp_pci_io_write() Date: Wed, 26 Feb 2020 16:46:38 +0800 Message-ID: <20200226084647.20636-5-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200226084647.20636-1-kuhn.chenqun@huawei.com> References: <20200226084647.20636-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.190 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, Euler Robot , zhang.zhanghailiang@huawei.com, Paolo Bonzini , Chen Qun Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 Wed Feb 26 08:46:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 1244792 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=huawei.com 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 ozlabs.org (Postfix) with ESMTPS id 48S8gr47npz9sNg for ; Wed, 26 Feb 2020 19:52:24 +1100 (AEDT) Received: from localhost ([::1]:40082 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6sQY-0007t0-Gb for incoming@patchwork.ozlabs.org; Wed, 26 Feb 2020 03:52:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44633) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6sM7-0000Po-2e for qemu-devel@nongnu.org; Wed, 26 Feb 2020 03:47:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6sM5-0007Z6-Vz for qemu-devel@nongnu.org; Wed, 26 Feb 2020 03:47:47 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:3166 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j6sM5-0007Ng-Hs; Wed, 26 Feb 2020 03:47:45 -0500 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 8414DBC3328692CDDA27; Wed, 26 Feb 2020 16:47:42 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.439.0; Wed, 26 Feb 2020 16:47:33 +0800 From: To: , Subject: [PATCH v2 05/13] scsi/scsi-disk: Remove redundant statement in scsi_disk_emulate_command() Date: Wed, 26 Feb 2020 16:46:39 +0800 Message-ID: <20200226084647.20636-6-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200226084647.20636-1-kuhn.chenqun@huawei.com> References: <20200226084647.20636-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.190 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, zhang.zhanghailiang@huawei.com, Chen Qun , Euler Robot , Paolo Bonzini Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 Wed Feb 26 08:46:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 1244787 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=huawei.com 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 ozlabs.org (Postfix) with ESMTPS id 48S8dj30ggz9sNg for ; Wed, 26 Feb 2020 19:50:33 +1100 (AEDT) Received: from localhost ([::1]:40040 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6sOl-0004LJ-9k for incoming@patchwork.ozlabs.org; Wed, 26 Feb 2020 03:50:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44638) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6sM7-0000Q3-5r for qemu-devel@nongnu.org; Wed, 26 Feb 2020 03:47:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6sM6-0007ZW-0a for qemu-devel@nongnu.org; Wed, 26 Feb 2020 03:47:47 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:3167 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j6sM5-0007Nh-KP; Wed, 26 Feb 2020 03:47:45 -0500 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 890FFA42264ED9080070; Wed, 26 Feb 2020 16:47:42 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.439.0; Wed, 26 Feb 2020 16:47:33 +0800 From: To: , Subject: [PATCH v2 06/13] display/pxa2xx_lcd: Remove redundant statement in pxa2xx_palette_parse() Date: Wed, 26 Feb 2020 16:46:40 +0800 Message-ID: <20200226084647.20636-7-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200226084647.20636-1-kuhn.chenqun@huawei.com> References: <20200226084647.20636-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.190 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, Euler Robot , zhang.zhanghailiang@huawei.com, Chen Qun Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 --- 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 Wed Feb 26 08:46:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 1244785 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=huawei.com 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 ozlabs.org (Postfix) with ESMTPS id 48S8bX4kvyz9sNg for ; Wed, 26 Feb 2020 19:48:40 +1100 (AEDT) Received: from localhost ([::1]:39978 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6sMw-0000TO-Ha for incoming@patchwork.ozlabs.org; Wed, 26 Feb 2020 03:48:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44563) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6sM5-0000Os-Vi for qemu-devel@nongnu.org; Wed, 26 Feb 2020 03:47:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6sM4-0007Tq-SK for qemu-devel@nongnu.org; Wed, 26 Feb 2020 03:47:45 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:58948 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j6sM4-0007Mf-Fd; Wed, 26 Feb 2020 03:47:44 -0500 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 65F9A855B94B2C5D2408; Wed, 26 Feb 2020 16:47:42 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.439.0; Wed, 26 Feb 2020 16:47:34 +0800 From: To: , Subject: [PATCH v2 07/13] display/exynos4210_fimd: Remove redundant statement in exynos4210_fimd_update() Date: Wed, 26 Feb 2020 16:46:41 +0800 Message-ID: <20200226084647.20636-8-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200226084647.20636-1-kuhn.chenqun@huawei.com> References: <20200226084647.20636-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.32 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, Euler Robot , zhang.zhanghailiang@huawei.com, Chen Qun Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 --- 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 Wed Feb 26 08:46:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 1244786 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=huawei.com 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 ozlabs.org (Postfix) with ESMTPS id 48S8dW29bYz9sNg for ; Wed, 26 Feb 2020 19:50:22 +1100 (AEDT) Received: from localhost ([::1]:40038 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6sOZ-00043R-0B for incoming@patchwork.ozlabs.org; Wed, 26 Feb 2020 03:50:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44575) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6sM6-0000Ov-4L for qemu-devel@nongnu.org; Wed, 26 Feb 2020 03:47:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6sM5-0007Uj-0f for qemu-devel@nongnu.org; Wed, 26 Feb 2020 03:47:46 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:59038 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j6sM4-0007Nj-Ks; Wed, 26 Feb 2020 03:47:44 -0500 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 69975A471B758272973D; Wed, 26 Feb 2020 16:47:42 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.439.0; Wed, 26 Feb 2020 16:47:35 +0800 From: To: , Subject: [PATCH v2 08/13] display/blizzard: Remove redundant statement in blizzard_draw_line16_32() Date: Wed, 26 Feb 2020 16:46:42 +0800 Message-ID: <20200226084647.20636-9-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200226084647.20636-1-kuhn.chenqun@huawei.com> References: <20200226084647.20636-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.32 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, Euler Robot , zhang.zhanghailiang@huawei.com, Chen Qun Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 --- 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 Wed Feb 26 08:46:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 1244791 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=huawei.com 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 ozlabs.org (Postfix) with ESMTPS id 48S8gq1cQ8z9sNg for ; Wed, 26 Feb 2020 19:52:23 +1100 (AEDT) Received: from localhost ([::1]:40084 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6sQX-0007uK-5k for incoming@patchwork.ozlabs.org; Wed, 26 Feb 2020 03:52:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44568) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6sM6-0000Ou-1O for qemu-devel@nongnu.org; Wed, 26 Feb 2020 03:47:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6sM4-0007UD-Tf for qemu-devel@nongnu.org; Wed, 26 Feb 2020 03:47:45 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:58916 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j6sM4-0007Mh-Gr; Wed, 26 Feb 2020 03:47:44 -0500 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 5D2F9822B375C71AF9F1; Wed, 26 Feb 2020 16:47:42 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.439.0; Wed, 26 Feb 2020 16:47:35 +0800 From: To: , Subject: [PATCH v2 09/13] dma/xlnx-zdma: Remove redundant statement in zdma_write_dst() Date: Wed, 26 Feb 2020 16:46:43 +0800 Message-ID: <20200226084647.20636-10-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200226084647.20636-1-kuhn.chenqun@huawei.com> References: <20200226084647.20636-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.32 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, Chen Qun , Alistair Francis , Euler Robot , "Edgar E. Iglesias" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Francisco Iglesias Reviewed-by: Alistair Francis --- Cc: Alistair Francis Cc: "Edgar E. Iglesias" Cc: Peter Maydell Cc: Philippe Mathieu-Daudé v1->v2: move the 'dst_type' declaration.(Base on Philippe's suggestion). --- hw/dma/xlnx-zdma.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/dma/xlnx-zdma.c b/hw/dma/xlnx-zdma.c index 8fb83f5b07..eeacad59ce 100644 --- a/hw/dma/xlnx-zdma.c +++ b/hw/dma/xlnx-zdma.c @@ -373,7 +373,7 @@ static uint64_t zdma_update_descr_addr(XlnxZDMA *s, bool type, static void zdma_write_dst(XlnxZDMA *s, uint8_t *buf, uint32_t len) { uint32_t dst_size, dlen; - bool dst_intr, dst_type; + bool dst_intr; unsigned int ptype = ARRAY_FIELD_EX32(s->regs, ZDMA_CH_CTRL0, POINT_TYPE); unsigned int rw_mode = ARRAY_FIELD_EX32(s->regs, ZDMA_CH_CTRL0, MODE); unsigned int burst_type = ARRAY_FIELD_EX32(s->regs, ZDMA_CH_DATA_ATTR, @@ -387,17 +387,17 @@ static void zdma_write_dst(XlnxZDMA *s, uint8_t *buf, uint32_t len) while (len) { 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); if (dst_size == 0 && ptype == PT_MEM) { uint64_t next; + bool dst_type = FIELD_EX32(s->dsc_dst.words[3], + ZDMA_CH_DST_DSCR_WORD3, + TYPE); + next = zdma_update_descr_addr(s, dst_type, R_ZDMA_CH_DST_CUR_DSCR_LSB); 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 Wed Feb 26 08:46:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 1244788 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=huawei.com 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 ozlabs.org (Postfix) with ESMTPS id 48S8dk1Yt8z9sR4 for ; Wed, 26 Feb 2020 19:50:34 +1100 (AEDT) Received: from localhost ([::1]:40042 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6sOm-0004NF-0d for incoming@patchwork.ozlabs.org; Wed, 26 Feb 2020 03:50:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44626) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6sM6-0000Pc-Uf for qemu-devel@nongnu.org; Wed, 26 Feb 2020 03:47:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6sM5-0007Yn-UF for qemu-devel@nongnu.org; Wed, 26 Feb 2020 03:47:46 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:3169 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j6sM5-0007Nu-Gs; Wed, 26 Feb 2020 03:47:45 -0500 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 92B7FCBC3D819B6B070B; Wed, 26 Feb 2020 16:47:42 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.439.0; Wed, 26 Feb 2020 16:47:36 +0800 From: To: , Subject: [PATCH v2 10/13] migration/vmstate: Remove redundant statement in vmstate_save_state_v() Date: Wed, 26 Feb 2020 16:46:44 +0800 Message-ID: <20200226084647.20636-11-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200226084647.20636-1-kuhn.chenqun@huawei.com> References: <20200226084647.20636-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.190 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, Juan Quintela , "Dr. David Alan Gilbert" , Euler Robot , Chen Qun Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 Reviewed-by: Juan Quintela --- 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 Wed Feb 26 08:46:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 1244793 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=huawei.com 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 ozlabs.org (Postfix) with ESMTPS id 48S8hR59tqz9sNg for ; Wed, 26 Feb 2020 19:52:55 +1100 (AEDT) Received: from localhost ([::1]:40094 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6sR3-0000KS-LA for incoming@patchwork.ozlabs.org; Wed, 26 Feb 2020 03:52:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44831) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6sMB-0000aV-2A for qemu-devel@nongnu.org; Wed, 26 Feb 2020 03:47:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6sM9-0007tX-TY for qemu-devel@nongnu.org; Wed, 26 Feb 2020 03:47:50 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:46018 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j6sM9-0007ii-Hb; Wed, 26 Feb 2020 03:47:49 -0500 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 6538763AA6C33F9451EE; Wed, 26 Feb 2020 16:47:47 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.439.0; Wed, 26 Feb 2020 16:47:36 +0800 From: To: , Subject: [PATCH v2 11/13] timer/exynos4210_mct: Remove redundant statement in exynos4210_mct_write() Date: Wed, 26 Feb 2020 16:46:45 +0800 Message-ID: <20200226084647.20636-12-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200226084647.20636-1-kuhn.chenqun@huawei.com> References: <20200226084647.20636-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: Igor Mitsyanko , peter.maydell@linaro.org, Euler Robot , zhang.zhanghailiang@huawei.com, Chen Qun Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 --- 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 Wed Feb 26 08:46:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 1244795 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=huawei.com 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 ozlabs.org (Postfix) with ESMTPS id 48S8kN1lmjz9sR4 for ; Wed, 26 Feb 2020 19:54:36 +1100 (AEDT) Received: from localhost ([::1]:40132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6sSg-0003IO-4C for incoming@patchwork.ozlabs.org; Wed, 26 Feb 2020 03:54:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44838) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6sMB-0000b7-7b for qemu-devel@nongnu.org; Wed, 26 Feb 2020 03:47:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6sMA-0007uk-3y for qemu-devel@nongnu.org; Wed, 26 Feb 2020 03:47:51 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:46048 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j6sM9-0007jV-Nr; Wed, 26 Feb 2020 03:47:50 -0500 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 9221BA449786916D8ADB; Wed, 26 Feb 2020 16:47:47 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.439.0; Wed, 26 Feb 2020 16:47:37 +0800 From: To: , Subject: [PATCH v2 12/13] usb/hcd-ehci: Remove redundant statements Date: Wed, 26 Feb 2020 16:46:46 +0800 Message-ID: <20200226084647.20636-13-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200226084647.20636-1-kuhn.chenqun@huawei.com> References: <20200226084647.20636-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: peter.maydell@linaro.org, zhang.zhanghailiang@huawei.com, Gerd Hoffmann , Euler Robot , Chen Qun , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 Cc: Philippe Mathieu-Daudé --- 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 Wed Feb 26 08:46:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 1244796 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=huawei.com 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 ozlabs.org (Postfix) with ESMTPS id 48S8lC5Wr1z9sRG for ; Wed, 26 Feb 2020 19:55:19 +1100 (AEDT) Received: from localhost ([::1]:40156 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6sTN-00057b-MV for incoming@patchwork.ozlabs.org; Wed, 26 Feb 2020 03:55:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44829) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6sMA-0000aK-Vn for qemu-devel@nongnu.org; Wed, 26 Feb 2020 03:47:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6sM9-0007tz-V6 for qemu-devel@nongnu.org; Wed, 26 Feb 2020 03:47:50 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:46022 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j6sM9-0007it-Iw; Wed, 26 Feb 2020 03:47:49 -0500 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 6964B7A0165D9F31CFF8; Wed, 26 Feb 2020 16:47:47 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.439.0; Wed, 26 Feb 2020 16:47:38 +0800 From: To: , Subject: [PATCH v2 13/13] monitor/hmp-cmds: Remove redundant statement in hmp_rocker_of_dpa_groups() Date: Wed, 26 Feb 2020 16:46:47 +0800 Message-ID: <20200226084647.20636-14-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200226084647.20636-1-kuhn.chenqun@huawei.com> References: <20200226084647.20636-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: peter.maydell@linaro.org, zhang.zhanghailiang@huawei.com, "Dr. David Alan Gilbert" , Euler Robot , Chen Qun , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 Reviewed-by: Philippe Mathieu-Daudé --- Cc: "Dr. David Alan Gilbert" Cc: Philippe Mathieu-Daudé v1->v2: move the 'set' declaration to the for() statement(Base on Philippe's suggestion). --- monitor/hmp-cmds.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index 53bc3f76c4..c6b0495822 100644 --- a/monitor/hmp-cmds.c +++ b/monitor/hmp-cmds.c @@ -2808,7 +2808,6 @@ void hmp_rocker_of_dpa_groups(Monitor *mon, const QDict *qdict) const char *name = qdict_get_str(qdict, "name"); uint8_t type = qdict_get_try_int(qdict, "type", 9); Error *err = NULL; - bool set = false; list = qmp_query_rocker_of_dpa_groups(name, type != 9, type, &err); if (err != NULL) { @@ -2820,6 +2819,7 @@ void hmp_rocker_of_dpa_groups(Monitor *mon, const QDict *qdict) for (g = list; g; g = g->next) { RockerOfDpaGroup *group = g->value; + bool set = false; monitor_printf(mon, "0x%08x", group->id); @@ -2864,14 +2864,11 @@ 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); } - set = false; - if (group->has_ttl_check && group->ttl_check) { monitor_printf(mon, " check TTL"); }