From patchwork Mon Mar 2 13:07:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 11415525 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 72D9C92A for ; Mon, 2 Mar 2020 13:10: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 5413C21739 for ; Mon, 2 Mar 2020 13:10:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5413C21739 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]:60828 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8kqI-0003mn-IA for patchwork-qemu-devel@patchwork.kernel.org; Mon, 02 Mar 2020 08:10:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48640) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8kni-0006Ff-Fs for qemu-devel@nongnu.org; Mon, 02 Mar 2020 08:08:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j8knh-0003MN-By for qemu-devel@nongnu.org; Mon, 02 Mar 2020 08:08:02 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:51536 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j8kng-0003Ip-Vp; Mon, 02 Mar 2020 08:08:01 -0500 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 30214E7C45B717FB405E; Mon, 2 Mar 2020 21:07:53 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.439.0; Mon, 2 Mar 2020 21:07:45 +0800 From: Chen Qun To: , Subject: [PATCH v3 01/12] block/stream: Remove redundant statement in stream_run() Date: Mon, 2 Mar 2020 21:07:04 +0800 Message-ID: <20200302130715.29440-3-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200302130715.29440-1-kuhn.chenqun@huawei.com> References: <20200302130715.29440-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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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 v1->v2:move 'ret' declaration to the for() statement(Base on Kevin's comments). --- block/stream.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/stream.c b/block/stream.c index 5562ccbf57..aa2e7af98e 100644 --- a/block/stream.c +++ b/block/stream.c @@ -114,7 +114,6 @@ static int coroutine_fn stream_run(Job *job, Error **errp) int64_t offset = 0; uint64_t delay_ns = 0; int error = 0; - int ret = 0; int64_t n = 0; /* bytes */ if (bs == s->bottom) { @@ -139,6 +138,7 @@ static int coroutine_fn stream_run(Job *job, Error **errp) for ( ; offset < len; offset += n) { bool copy; + int ret; /* Note that even when no rate limit is applied we need to yield * with no pending I/O here so that bdrv_drain_all() returns. @@ -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 Mon Mar 2 13:07:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 11415523 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 A8E70174A for ; Mon, 2 Mar 2020 13:10:14 +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 8A0A321739 for ; Mon, 2 Mar 2020 13:10:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8A0A321739 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]:60808 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8kpp-0002g0-Ns for patchwork-qemu-devel@patchwork.kernel.org; Mon, 02 Mar 2020 08:10:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48641) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8kni-0006Fg-FQ for qemu-devel@nongnu.org; Mon, 02 Mar 2020 08:08:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j8knh-0003MO-By for qemu-devel@nongnu.org; Mon, 02 Mar 2020 08:08:02 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:51528 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j8kng-0003Iq-Vb; Mon, 02 Mar 2020 08:08:01 -0500 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 26024FA5F96E0F866802; Mon, 2 Mar 2020 21:07:53 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.439.0; Mon, 2 Mar 2020 21:07:46 +0800 From: Chen Qun To: , Subject: [PATCH v3 02/12] block/iscsi:Remove redundant statement in iscsi_open() Date: Mon, 2 Mar 2020 21:07:05 +0800 Message-ID: <20200302130715.29440-4-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200302130715.29440-1-kuhn.chenqun@huawei.com> References: <20200302130715.29440-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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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 Reviewed-by: Kevin Wolf --- Cc: Ronnie Sahlberg Cc: Paolo Bonzini Cc: Peter Lieven Cc: Kevin Wolf Cc: Max Reitz v1->v2: Keep the 'flags' then use it(Base on Kevin's comments). --- block/iscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/iscsi.c b/block/iscsi.c index 682abd8e09..50bae51700 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -2002,7 +2002,7 @@ static int iscsi_open(BlockDriverState *bs, QDict *options, int flags, iscsilun->cluster_size = iscsilun->bl.opt_unmap_gran * iscsilun->block_size; if (iscsilun->lbprz) { - ret = iscsi_allocmap_init(iscsilun, bs->open_flags); + ret = iscsi_allocmap_init(iscsilun, flags); } } From patchwork Mon Mar 2 13:07:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 11415503 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 5E003174A for ; Mon, 2 Mar 2020 13:09:29 +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 3FB1821739 for ; Mon, 2 Mar 2020 13:09:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3FB1821739 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]:60788 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8kp6-0000d9-Ar for patchwork-qemu-devel@patchwork.kernel.org; Mon, 02 Mar 2020 08:09:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48639) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8kni-0006Fe-Fv for qemu-devel@nongnu.org; Mon, 02 Mar 2020 08:08:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j8knh-0003MC-Bj for qemu-devel@nongnu.org; Mon, 02 Mar 2020 08:08:02 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:51532 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j8kng-0003Ir-VV; Mon, 02 Mar 2020 08:08:01 -0500 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 2B3C4B8B17646587C289; Mon, 2 Mar 2020 21:07:53 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.439.0; Mon, 2 Mar 2020 21:07:46 +0800 From: Chen Qun To: , Subject: [PATCH v3 03/12] block/file-posix: Remove redundant statement in raw_handle_perm_lock() Date: Mon, 2 Mar 2020 21:07:06 +0800 Message-ID: <20200302130715.29440-5-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200302130715.29440-1-kuhn.chenqun@huawei.com> References: <20200302130715.29440-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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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 Mon Mar 2 13:07:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 11415529 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 CBAD9174A for ; Mon, 2 Mar 2020 13:11:46 +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 AC5932173E for ; Mon, 2 Mar 2020 13:11:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AC5932173E 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]:60842 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8krJ-0005Te-U8 for patchwork-qemu-devel@patchwork.kernel.org; Mon, 02 Mar 2020 08:11:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48653) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8kni-0006Fj-Pe for qemu-devel@nongnu.org; Mon, 02 Mar 2020 08:08:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j8knh-0003Mf-Ol for qemu-devel@nongnu.org; Mon, 02 Mar 2020 08:08:02 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:3178 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j8knh-0003Iu-D8; Mon, 02 Mar 2020 08:08:01 -0500 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 4FF2821955A36AD40F6B; Mon, 2 Mar 2020 21:07:53 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.439.0; Mon, 2 Mar 2020 21:07:47 +0800 From: Chen Qun To: , Subject: [PATCH v3 04/12] scsi/esp-pci: Remove redundant statement in esp_pci_io_write() Date: Mon, 2 Mar 2020 21:07:07 +0800 Message-ID: <20200302130715.29440-6-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200302130715.29440-1-kuhn.chenqun@huawei.com> References: <20200302130715.29440-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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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 Mon Mar 2 13:07:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 11415521 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 4F6B992A for ; Mon, 2 Mar 2020 13:09:48 +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 30E4D21739 for ; Mon, 2 Mar 2020 13:09:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 30E4D21739 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]:60798 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8kpP-0001Sx-At for patchwork-qemu-devel@patchwork.kernel.org; Mon, 02 Mar 2020 08:09:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48911) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8ko7-0006pf-4E for qemu-devel@nongnu.org; Mon, 02 Mar 2020 08:08:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j8ko4-0003SH-Ph for qemu-devel@nongnu.org; Mon, 02 Mar 2020 08:08:25 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:51764 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j8ko4-0003Ms-Dc; Mon, 02 Mar 2020 08:08:24 -0500 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 404A2974DEB5C69ADDAE; Mon, 2 Mar 2020 21:07:58 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.439.0; Mon, 2 Mar 2020 21:07:47 +0800 From: Chen Qun To: , Subject: [PATCH v3 05/12] scsi/scsi-disk: Remove redundant statement in scsi_disk_emulate_command() Date: Mon, 2 Mar 2020 21:07:08 +0800 Message-ID: <20200302130715.29440-7-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200302130715.29440-1-kuhn.chenqun@huawei.com> References: <20200302130715.29440-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: Fam Zheng , peter.maydell@linaro.org, zhang.zhanghailiang@huawei.com, Chen Qun , Euler Robot , Paolo Bonzini Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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 Reviewed-by: Laurent Vivier --- 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 Mon Mar 2 13:07:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 11415533 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 8DB2D14B4 for ; Mon, 2 Mar 2020 13:13: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 6EA6621739 for ; Mon, 2 Mar 2020 13:13:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6EA6621739 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]:60862 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8ksX-0007em-JG for patchwork-qemu-devel@patchwork.kernel.org; Mon, 02 Mar 2020 08:13:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48755) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8knl-0006GR-1A for qemu-devel@nongnu.org; Mon, 02 Mar 2020 08:08:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j8knk-0003Od-0K for qemu-devel@nongnu.org; Mon, 02 Mar 2020 08:08:04 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:51756 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j8knj-0003Mk-KM; Mon, 02 Mar 2020 08:08:03 -0500 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 2E44AA81D8ABFD82BBE5; Mon, 2 Mar 2020 21:07:58 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.439.0; Mon, 2 Mar 2020 21:07:48 +0800 From: Chen Qun To: , Subject: [PATCH v3 06/12] display/pxa2xx_lcd: Remove redundant statement in pxa2xx_palette_parse() Date: Mon, 2 Mar 2020 21:07:09 +0800 Message-ID: <20200302130715.29440-8-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200302130715.29440-1-kuhn.chenqun@huawei.com> References: <20200302130715.29440-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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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 Reviewed-by: Laurent Vivier --- 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 Mon Mar 2 13:07:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 11415535 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 6C3A914B4 for ; Mon, 2 Mar 2020 13:14:26 +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 4C51F217F4 for ; Mon, 2 Mar 2020 13:14:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4C51F217F4 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]:60890 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8ktt-0001ag-GU for patchwork-qemu-devel@patchwork.kernel.org; Mon, 02 Mar 2020 08:14:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48757) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8knl-0006GS-2m for qemu-devel@nongnu.org; Mon, 02 Mar 2020 08:08:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j8knj-0003OW-Vy for qemu-devel@nongnu.org; Mon, 02 Mar 2020 08:08:05 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:51762 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j8knj-0003Mm-Jh; Mon, 02 Mar 2020 08:08:03 -0500 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 3C7B568BD8D6A4CC4AD7; Mon, 2 Mar 2020 21:07:58 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.439.0; Mon, 2 Mar 2020 21:07:49 +0800 From: Chen Qun To: , Subject: [PATCH v3 07/12] display/exynos4210_fimd: Remove redundant statement in exynos4210_fimd_update() Date: Mon, 2 Mar 2020 21:07:10 +0800 Message-ID: <20200302130715.29440-9-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200302130715.29440-1-kuhn.chenqun@huawei.com> References: <20200302130715.29440-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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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 Reviewed-by: Laurent Vivier Reviewed-by: Laurent Vivier --- 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 Mon Mar 2 13:07:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 11415531 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 57725174A for ; Mon, 2 Mar 2020 13:12:13 +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 38A1021739 for ; Mon, 2 Mar 2020 13:12:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 38A1021739 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]:60846 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8krk-0006Dl-Ey for patchwork-qemu-devel@patchwork.kernel.org; Mon, 02 Mar 2020 08:12:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48649) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8kni-0006Fi-Jc for qemu-devel@nongnu.org; Mon, 02 Mar 2020 08:08:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j8knh-0003MZ-Ll for qemu-devel@nongnu.org; Mon, 02 Mar 2020 08:08:02 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:55482 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j8knh-0003La-9U; Mon, 02 Mar 2020 08:08:01 -0500 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 4D915793AA68359AB045; Mon, 2 Mar 2020 21:07:58 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.439.0; Mon, 2 Mar 2020 21:07:49 +0800 From: Chen Qun To: , Subject: [PATCH v3 08/12] display/blizzard: Remove redundant statement in blizzard_draw_line16_32() Date: Mon, 2 Mar 2020 21:07:11 +0800 Message-ID: <20200302130715.29440-10-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200302130715.29440-1-kuhn.chenqun@huawei.com> References: <20200302130715.29440-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, Euler Robot , zhang.zhanghailiang@huawei.com, Chen Qun Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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 Mon Mar 2 13:07:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 11415537 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 EAE4D174A for ; Mon, 2 Mar 2020 13:15: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 CB90B217F4 for ; Mon, 2 Mar 2020 13:15:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CB90B217F4 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]:60926 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8kv7-0002zo-TP for patchwork-qemu-devel@patchwork.kernel.org; Mon, 02 Mar 2020 08:15:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48812) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8knl-0006Gt-TG for qemu-devel@nongnu.org; Mon, 02 Mar 2020 08:08:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j8knk-0003PB-JS for qemu-devel@nongnu.org; Mon, 02 Mar 2020 08:08:05 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:51760 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j8knk-0003Mp-6A; Mon, 02 Mar 2020 08:08:04 -0500 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 374647BF6694896F34FF; Mon, 2 Mar 2020 21:07:58 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.439.0; Mon, 2 Mar 2020 21:07:50 +0800 From: Chen Qun To: , Subject: [PATCH v3 09/12] dma/xlnx-zdma: Remove redundant statement in zdma_write_dst() Date: Mon, 2 Mar 2020 21:07:12 +0800 Message-ID: <20200302130715.29440-11-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200302130715.29440-1-kuhn.chenqun@huawei.com> References: <20200302130715.29440-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, Francisco Iglesias , Alistair Francis , "Edgar E. Iglesias" , Alistair Francis , Euler Robot , Chen Qun , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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 Reviewed-by: Edgar E. Iglesias --- 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 Mon Mar 2 13:07:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 11415527 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 CF9A614B4 for ; Mon, 2 Mar 2020 13:11:04 +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 B0E2121739 for ; Mon, 2 Mar 2020 13:11:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B0E2121739 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]:60832 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8kqd-0004FE-SZ for patchwork-qemu-devel@patchwork.kernel.org; Mon, 02 Mar 2020 08:11:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48773) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8knl-0006GU-9S for qemu-devel@nongnu.org; Mon, 02 Mar 2020 08:08:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j8knk-0003Oi-0y for qemu-devel@nongnu.org; Mon, 02 Mar 2020 08:08:05 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:51766 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j8knj-0003Mr-L8; Mon, 02 Mar 2020 08:08:03 -0500 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 44B5381F7092D2E362EC; Mon, 2 Mar 2020 21:07:58 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.439.0; Mon, 2 Mar 2020 21:07:51 +0800 From: Chen Qun To: , Subject: [PATCH v3 10/12] timer/exynos4210_mct: Remove redundant statement in exynos4210_mct_write() Date: Mon, 2 Mar 2020 21:07:13 +0800 Message-ID: <20200302130715.29440-12-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200302130715.29440-1-kuhn.chenqun@huawei.com> References: <20200302130715.29440-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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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 Mon Mar 2 13:07:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 11415493 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 D197F92A for ; Mon, 2 Mar 2020 13:09:07 +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 B2CB2217F4 for ; Mon, 2 Mar 2020 13:09:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B2CB2217F4 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]:60784 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8kok-00085Y-Ni for patchwork-qemu-devel@patchwork.kernel.org; Mon, 02 Mar 2020 08:09:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48766) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8knl-0006GT-6H for qemu-devel@nongnu.org; Mon, 02 Mar 2020 08:08:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j8knj-0003ON-UT for qemu-devel@nongnu.org; Mon, 02 Mar 2020 08:08:05 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:51758 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j8knj-0003Mj-IJ; Mon, 02 Mar 2020 08:08:03 -0500 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 326837649F9E2992C69B; Mon, 2 Mar 2020 21:07:58 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.439.0; Mon, 2 Mar 2020 21:07:52 +0800 From: Chen Qun To: , Subject: [PATCH v3 11/12] usb/hcd-ehci: Remove redundant statements Date: Mon, 2 Mar 2020 21:07:14 +0800 Message-ID: <20200302130715.29440-13-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200302130715.29440-1-kuhn.chenqun@huawei.com> References: <20200302130715.29440-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, Gerd Hoffmann , Euler Robot , Chen Qun , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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é Acked-by: Gerd Hoffmann --- 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 Mon Mar 2 13:07:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chen Qun X-Patchwork-Id: 11415539 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 01457930 for ; Mon, 2 Mar 2020 13:17:12 +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 89FB62064A for ; Mon, 2 Mar 2020 13:17:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 89FB62064A 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]:60932 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8kwY-000448-Q3 for patchwork-qemu-devel@patchwork.kernel.org; Mon, 02 Mar 2020 08:17:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48815) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8knl-0006Gv-Uf for qemu-devel@nongnu.org; Mon, 02 Mar 2020 08:08:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j8knk-0003Pa-QF for qemu-devel@nongnu.org; Mon, 02 Mar 2020 08:08:05 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:51768 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j8knj-0003Mq-K9; Mon, 02 Mar 2020 08:08:04 -0500 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 64C489648BA4CAF3AFE9; Mon, 2 Mar 2020 21:07:58 +0800 (CST) Received: from huawei.com (10.133.205.93) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.439.0; Mon, 2 Mar 2020 21:07:52 +0800 From: Chen Qun To: , Subject: [PATCH v3 12/12] monitor/hmp-cmds: Remove redundant statement in hmp_rocker_of_dpa_groups() Date: Mon, 2 Mar 2020 21:07:15 +0800 Message-ID: <20200302130715.29440-14-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200302130715.29440-1-kuhn.chenqun@huawei.com> References: <20200302130715.29440-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, "Dr. David Alan Gilbert" , Euler Robot , Chen Qun , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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é Reviewed-by: Laurent Vivier --- 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"); }