From patchwork Wed Apr 22 13:31:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 284066 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B938C55185 for ; Wed, 22 Apr 2020 13:37:17 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 49BAC2076E for ; Wed, 22 Apr 2020 13:37:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="OY2XgS2s" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 49BAC2076E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:50800 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRFYx-0004vY-Ix for qemu-devel@archiver.kernel.org; Wed, 22 Apr 2020 09:37:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59812) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRFV0-0007Vy-34 for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:33:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jRFUz-00052T-Kg for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:33:09 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:33104 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jRFUz-0004zk-6L for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:33:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587562388; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2U6ARuvMvLKS+fqGTEoijz7r0B3fBwOwTnOOBFQNRAw=; b=OY2XgS2sSon8MK7t/t+L497su4hFSAPjGI0EmCC34Lz4w3ssEBV2uN+WPMRr/hNTW7y6Mr EKRZ4uS59y5/o8q0DIT4p+YOPRXF7pv+GpT05IYxRPqqMNrDH+iGhDA7Cb6NLCplgRm1El c1ObA63NWUqQefo12cwXxx3XJkPY61Q= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-75-ncgil7nSOyGfb95W5BY1kA-1; Wed, 22 Apr 2020 09:33:07 -0400 X-MC-Unique: ncgil7nSOyGfb95W5BY1kA-1 Received: by mail-wm1-f72.google.com with SMTP id q5so792372wmc.9 for ; Wed, 22 Apr 2020 06:33:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ez+E9s5mwrT8B9y8nVUYgFPf3iN6ckUcWWVa90evmD4=; b=MGL6xv/UYM6ocje2c4Nx4IP8PiAVhWtTdxKdKXyW4j5Eqa6+aGuHa/Sjp0BR5xnWFM RsXrdxeCR4phE/5kVKEEk8drNMIWoIRbEY7PWNlCdHAD8XP584dZME3FG6WJGyWPG3u2 DS2qZRezuFl7RXGfk+iGctBor6n4Cx2hcPiMOrOVodO1Mgf+B0KGqRvHP0q3VTlF6Dy7 P3cTGfkYle3EsyN35KujCZB6skKrZkAIpZbMuLUxQ/gdKocUmeFZw6oytvGosDa1zCPf 1SQ7GjU0jJ0/h3cPICaZjyn5CSH2gq+wYjPu6banlzurjoAylro4PvCVMcego0JMPprJ UIPA== X-Gm-Message-State: AGi0PuarPNrkFk7WiuPBEDu4Z2pK/MohHb6BBIKD6MflU2M7ohZBDH1u W/hregOy4JebNetRRQjs6/zzBgAA1LizpcZ/XdlqieNq9sK3lS6LteJ/N2E646xh7IvLN/2GW9f W17MMhwvbMEBt2IE= X-Received: by 2002:a7b:cf25:: with SMTP id m5mr11344951wmg.65.1587562325424; Wed, 22 Apr 2020 06:32:05 -0700 (PDT) X-Google-Smtp-Source: APiQypLEMtqlGM7tlPDkeJxSPb7125x+W85cCCPYOZelLyU8UzBj4cOszGUa++XN2tBEWSaTPl4QZQ== X-Received: by 2002:a7b:cf25:: with SMTP id m5mr11344924wmg.65.1587562325181; Wed, 22 Apr 2020 06:32:05 -0700 (PDT) Received: from x1w.redhat.com (116.red-83-42-57.dynamicip.rima-tde.net. [83.42.57.116]) by smtp.gmail.com with ESMTPSA id b82sm8326135wmh.1.2020.04.22.06.32.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Apr 2020 06:32:04 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v3 2/9] blockdev: Remove dead assignment Date: Wed, 22 Apr 2020 15:31:45 +0200 Message-Id: <20200422133152.16770-3-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200422133152.16770-1-philmd@redhat.com> References: <20200422133152.16770-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.81; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/22 02:12:04 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 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 , "open list:Block layer core" , qemu-trivial@nongnu.org, Markus Armbruster , Max Reitz , =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Fix warning reported by Clang static code analyzer: CC blockdev.o blockdev.c:2744:5: warning: Value stored to 'ret' is never read ret = blk_truncate(blk, size, false, PREALLOC_MODE_OFF, errp); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reported-by: Clang Static Analyzer Signed-off-by: Philippe Mathieu-Daudé --- blockdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blockdev.c b/blockdev.c index fa8630cb41..6effd5afaa 100644 --- a/blockdev.c +++ b/blockdev.c @@ -2741,7 +2741,7 @@ void qmp_block_resize(bool has_device, const char *device, } bdrv_drained_begin(bs); - ret = blk_truncate(blk, size, false, PREALLOC_MODE_OFF, errp); + blk_truncate(blk, size, false, PREALLOC_MODE_OFF, errp); bdrv_drained_end(bs); out: From patchwork Wed Apr 22 13:31:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 284067 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 140C0C54FCB for ; Wed, 22 Apr 2020 13:36:39 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CE91720774 for ; Wed, 22 Apr 2020 13:36:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="gh+8NbYl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CE91720774 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:50796 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRFYL-0003u3-T9 for qemu-devel@archiver.kernel.org; Wed, 22 Apr 2020 09:36:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59294) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRFUK-0006PX-1Q for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:32:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jRFU9-0002Yt-5v for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:32:27 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:58174 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jRFU8-0002Xa-J9 for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:32:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587562335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kbhb8PXc0mO/1TMkYieEGxWYqNfWPp+iXA4REG7HVoQ=; b=gh+8NbYlc9eHBd7RJZ9Dx92Ag8S3ABMscec3U5blNaSfsQxNuY9Yi8tZQYpmDRF1Z1H2a4 x+1xVOaobvKmnEdRXuhV1OwsHSAzPoKjyKEKGAMZPeCen0Jc52YGIAMa1rmQNdZlxu7i1e FzQI//01omKK69C2LcQ/s0JbwFUpTYw= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-166-ISF335z7O3uN0zz-qqAcMw-1; Wed, 22 Apr 2020 09:32:11 -0400 X-MC-Unique: ISF335z7O3uN0zz-qqAcMw-1 Received: by mail-wr1-f71.google.com with SMTP id p16so1035845wro.16 for ; Wed, 22 Apr 2020 06:32:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bCsuLg6l9rCOFqdEp8PJclmAT0RCbEg/PEbjffqRb9A=; b=sudFHL3p3iCDEiPB3J5i8UM5CslFVw5/84rSy0Qa4N1fD/WUNuwpJhk9V0H8JH4KpG MEm1Gjl+ip24T+uN9RfZ61B9NU8UqgmO9ThAjh2wq3835C7BEeNyW4a0NaAoPmUsVuMX qohOUkEfha+JXCA6G3FSv0qDBcsEAPYoI4lzRR5JdEMcnD0CA0eu1uPPNCu1jzEjwGuv C/MIDqRjzHl+BmcDy+JOIWGr4raiHPh0DjtlHNyknSn+M8kL4w5zwM4YRfOIG0ojthYm 60HJFsfoAHZAkW52as/PLx+rgMF5wvKTNf2RS/GpGr4cmnAkidphywCWSno6XYd3hCTk fuEQ== X-Gm-Message-State: AGi0PuahiQvosuswdS9zWZNAoNpndU20sWHiTsDQtpXPP+xUSLtrLc7Z bB1vL6i/6dGipsf6S5nfb3gpjcomjqgaT1dsSubSraKDleevoghFfh8WX0idIj6gvoGHcYSqLAA 02q+3tLlKEQtQG6k= X-Received: by 2002:a7b:c755:: with SMTP id w21mr10387295wmk.120.1587562330240; Wed, 22 Apr 2020 06:32:10 -0700 (PDT) X-Google-Smtp-Source: APiQypLYA9+ugGytKHJcVjgqQyyLgri/XnZFg00t/v4mlEVQj2OqPIgxDxR5iT3qfGmXy8rHuq1B6w== X-Received: by 2002:a7b:c755:: with SMTP id w21mr10387279wmk.120.1587562330041; Wed, 22 Apr 2020 06:32:10 -0700 (PDT) Received: from x1w.redhat.com (116.red-83-42-57.dynamicip.rima-tde.net. [83.42.57.116]) by smtp.gmail.com with ESMTPSA id u127sm8228653wme.8.2020.04.22.06.32.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Apr 2020 06:32:09 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v3 3/9] hw/i2c/pm_smbus: Remove dead assignment Date: Wed, 22 Apr 2020 15:31:46 +0200 Message-Id: <20200422133152.16770-4-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200422133152.16770-1-philmd@redhat.com> References: <20200422133152.16770-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.120; envelope-from=philmd@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/22 04:15:03 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.120 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: qemu-trivial@nongnu.org, Alistair Francis , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Fix warning reported by Clang static code analyzer: CC hw/i2c/pm_smbus.o hw/i2c/pm_smbus.c:187:17: warning: Value stored to 'ret' is never read ret = 0; ^ ~ Reported-by: Clang Static Analyzer Reviewed-by: Alistair Francis Signed-off-by: Philippe Mathieu-Daudé --- hw/i2c/pm_smbus.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/i2c/pm_smbus.c b/hw/i2c/pm_smbus.c index 36994ff585..4728540c37 100644 --- a/hw/i2c/pm_smbus.c +++ b/hw/i2c/pm_smbus.c @@ -184,7 +184,6 @@ static void smb_transaction(PMSMBus *s) s->smb_stat |= STS_HOST_BUSY | STS_BYTE_DONE; s->smb_data[0] = s->smb_blkdata; s->smb_index = 0; - ret = 0; } goto out; } From patchwork Wed Apr 22 13:31:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 284068 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23392C55185 for ; Wed, 22 Apr 2020 13:34: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 D47962076E for ; Wed, 22 Apr 2020 13:34:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="iNiwjnjl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D47962076E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:50740 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRFWT-0000eP-P3 for qemu-devel@archiver.kernel.org; Wed, 22 Apr 2020 09:34:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59402) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRFUP-0006VL-ON for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:32:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jRFUM-00036i-AB for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:32:33 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:21864 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jRFUL-00032c-Rn for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:32:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587562348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Flbegfe+XvQdIALgmwjud+bmSRqDw+xWJxrHvvD5T5c=; b=iNiwjnjl37XE94rLwo8a2bZjfZOMwhUClEss3Kvi318ESsk3t/fycrV6g8rjDkCYBGAVwZ 3H7VhucekKB6IGQQzKoNao5Utnqwx8UiHG0rhufdXL1/Cp+uYoJt7gVhKJObNtwqcSEF38 Pr/rVhAI6dVMhmsxYrckPBxxtIg8lMU= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-360-MJLkgs73OHGSiNB18O8OKQ-1; Wed, 22 Apr 2020 09:32:26 -0400 X-MC-Unique: MJLkgs73OHGSiNB18O8OKQ-1 Received: by mail-wr1-f70.google.com with SMTP id m5so1038733wru.15 for ; Wed, 22 Apr 2020 06:32:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IDUYtKOADkWG3CN25Uq5JJobV9Wdj+VxIMt3IxDdn/o=; b=JglobhJhsqNJJ+WooicgLoDMJ0rYCbc+R0S4XooRxjs8tmvlWg8kSd4biQnGO/qTZQ xuqZMya/sB4wGfhP/x4PQsp9EjVFb02HiG3q4BOdPfUlpFtRTffgWi/SOxLoia0GxDoJ LTZnPyB/NZfOOp7/lJ0rW5VSF9rkzd5KyZGGhgZ0xmd/JciR9V/qLqvS5cp3ip8nN3DO 5tJs1etl3zP/uKI2MLKtSBJ3kNyhMihG6lrOl8sb6fzSn8CKV43UeM4dyN1V6M9Jr9Xt JjpOP7kKtbK8r+UuxC/VABTruPn3op+vMfuIZkUC8ssqIVFIYRZsxwSRvTyuDxQQLvwz HgsQ== X-Gm-Message-State: AGi0PuahOTq8owNYO9StUbChMPfP3VT0FxF78xxyR54FF4JIP3uZrEbZ bW6O2ak5sQoJSkgrdKB26iNt0ao3s3sKSMBt+vRLGo83uTke4TPNaggGFvE97kbQtQzKtUf6FhN VGSlRm0oRL9V4llc= X-Received: by 2002:a05:600c:2941:: with SMTP id n1mr10810675wmd.25.1587562344696; Wed, 22 Apr 2020 06:32:24 -0700 (PDT) X-Google-Smtp-Source: APiQypK7XDTD/6gL7xOy+W7IIyAp8MGKyH7Nh9z0DkzZBiiFlF4pLRNLxX+BVWqJa70s13YF7ZBNHA== X-Received: by 2002:a05:600c:2941:: with SMTP id n1mr10810659wmd.25.1587562344515; Wed, 22 Apr 2020 06:32:24 -0700 (PDT) Received: from x1w.redhat.com (116.red-83-42-57.dynamicip.rima-tde.net. [83.42.57.116]) by smtp.gmail.com with ESMTPSA id z1sm7749395wmf.15.2020.04.22.06.32.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Apr 2020 06:32:23 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v3 6/9] hw/isa/i82378: Remove dead assignment Date: Wed, 22 Apr 2020 15:31:49 +0200 Message-Id: <20200422133152.16770-7-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200422133152.16770-1-philmd@redhat.com> References: <20200422133152.16770-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.120; envelope-from=philmd@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/22 04:15:03 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.120 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: qemu-trivial@nongnu.org, Alistair Francis , "open list:PReP" , =?utf-8?q?Philippe_Mathieu-Da?= =?utf-8?q?ud=C3=A9?= , =?utf-8?q?Herv=C3=A9_Poussineau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Rename the unique variable assigned as 'pit' which better represents what it holds, to fix a warning reported by the Clang static code analyzer: CC hw/isa/i82378.o hw/isa/i82378.c:108:5: warning: Value stored to 'isa' is never read isa = isa_create_simple(isabus, "i82374"); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reported-by: Clang Static Analyzer Reviewed-by: Alistair Francis Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/i82378.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/isa/i82378.c b/hw/isa/i82378.c index dcb6b479ea..d9e6c7fa00 100644 --- a/hw/isa/i82378.c +++ b/hw/isa/i82378.c @@ -67,7 +67,7 @@ static void i82378_realize(PCIDevice *pci, Error **errp) I82378State *s = I82378(dev); uint8_t *pci_conf; ISABus *isabus; - ISADevice *isa; + ISADevice *pit; pci_conf = pci->config; pci_set_word(pci_conf + PCI_COMMAND, @@ -99,13 +99,13 @@ static void i82378_realize(PCIDevice *pci, Error **errp) isa_bus_irqs(isabus, s->i8259); /* 1 82C54 (pit) */ - isa = i8254_pit_init(isabus, 0x40, 0, NULL); + pit = i8254_pit_init(isabus, 0x40, 0, NULL); /* speaker */ - pcspk_init(isabus, isa); + pcspk_init(isabus, pit); /* 2 82C37 (dma) */ - isa = isa_create_simple(isabus, "i82374"); + isa_create_simple(isabus, "i82374"); } static void i82378_init(Object *obj) From patchwork Wed Apr 22 13:31:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 284065 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5706BC54FCB for ; Wed, 22 Apr 2020 13:40:54 +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 20C322076E for ; Wed, 22 Apr 2020 13:40:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Gf+80bbn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 20C322076E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:50868 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRFcT-0002T0-6x for qemu-devel@archiver.kernel.org; Wed, 22 Apr 2020 09:40:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59484) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRFUV-0006iL-IM for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:32:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jRFUU-0003Xq-JD for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:32:39 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:46491 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jRFUU-0003Rz-4n for qemu-devel@nongnu.org; Wed, 22 Apr 2020 09:32:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587562357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2C4mjVc4GupZqidy/jN6Lg6n+I2oMBFVaLfmcbIurl0=; b=Gf+80bbnZkPvcbufQhEQdBJ7zYPNmK/5fYf3Q7jUJcZLcBFvMddxjpTChD7oB9mr+MHks6 5cGvi4L+rCfpErz2IRuYZfqEOpis9SlrgAxn7WC+JQtDUDs1QcqJfB+MXWzj7g64AaIhaG AnTIKPIlrn3izv6ZbGLP8XPdhYot2fg= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-170-sdVPOeqfP7C_xI7wKdjXDQ-1; Wed, 22 Apr 2020 09:32:36 -0400 X-MC-Unique: sdVPOeqfP7C_xI7wKdjXDQ-1 Received: by mail-wm1-f70.google.com with SMTP id f81so809007wmf.2 for ; Wed, 22 Apr 2020 06:32:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Dq75PFzgynrFGY6/YI8kQB8GRBvNE4I9mXbmGtzIHFo=; b=s1bFYSh9wx2A+KtLN0ftoImqgv7AJ3fGslDbH5jnhIXdXChWELr3MDXFSxWkGYoMLD jViSNzJ71GRaGAGq0YpeKQKET1GmHCdJ87CFnvS9b8IYu8C9ja7YZMZjxrXdcOphhQI2 6JVIVoY2Doq2hmRcAy2BPScGQxqo0POsW7gz4gHvK4XAmmWOAwOL2MIpyUvaWNkR7Kee PJVW5g+Ft/LIl0pk3Nvj+fAFpKC8LAMzB7TZqV/TfrTlySARQDaZQO3dOm4bzthl3k/L 9tMH5jC7X2oC8MfEZ7AOG4a9Me1j8sumCuzWnmLK40leXOeL8N2snMgHUktlsGcTUhwr qkDg== X-Gm-Message-State: AGi0PuYwWGr/P1GvedoyAm71+OiKi/GaBjvc/LKp7vatFmwWhTAkAN8R iAFKpZm8Zx3lR4EY2j7chta17mFc+J49shztUGAgIadRTvy2zalLLb876RTN3Ylho1Yu16WwEyG i3n1Egg2J88EjncU= X-Received: by 2002:a05:6000:1001:: with SMTP id a1mr31239578wrx.9.1587562354687; Wed, 22 Apr 2020 06:32:34 -0700 (PDT) X-Google-Smtp-Source: APiQypL5S5fiw1pjeVHXAqixPkISK1j3A4uJRvzr0tgSExLtCfCpYkFUbSeWRoEQ0hralI1T6KA8dA== X-Received: by 2002:a05:6000:1001:: with SMTP id a1mr31239557wrx.9.1587562354470; Wed, 22 Apr 2020 06:32:34 -0700 (PDT) Received: from x1w.redhat.com (116.red-83-42-57.dynamicip.rima-tde.net. [83.42.57.116]) by smtp.gmail.com with ESMTPSA id h5sm8860641wrp.97.2020.04.22.06.32.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Apr 2020 06:32:33 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v3 8/9] hw/timer/stm32f2xx_timer: Remove dead assignment Date: Wed, 22 Apr 2020 15:31:51 +0200 Message-Id: <20200422133152.16770-9-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200422133152.16770-1-philmd@redhat.com> References: <20200422133152.16770-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.120; envelope-from=philmd@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/22 04:15:03 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.120 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 , qemu-trivial@nongnu.org, Alistair Francis , "open list:STM32F205" , Alistair Francis , =?utf-8?q?Philippe_Mathi?= =?utf-8?b?ZXUtRGF1ZMOp?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Fix warning reported by Clang static code analyzer: CC hw/timer/stm32f2xx_timer.o hw/timer/stm32f2xx_timer.c:225:9: warning: Value stored to 'value' is never read value = timer_val; ^ ~~~~~~~~~ Reported-by: Clang Static Analyzer Reviewed-by: Alistair Francis Signed-off-by: Philippe Mathieu-Daudé --- hw/timer/stm32f2xx_timer.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/timer/stm32f2xx_timer.c b/hw/timer/stm32f2xx_timer.c index 06ec8a02c2..ba8694dcd3 100644 --- a/hw/timer/stm32f2xx_timer.c +++ b/hw/timer/stm32f2xx_timer.c @@ -222,7 +222,6 @@ static void stm32f2xx_timer_write(void *opaque, hwaddr offset, case TIM_PSC: timer_val = stm32f2xx_ns_to_ticks(s, now) - s->tick_offset; s->tim_psc = value & 0xFFFF; - value = timer_val; break; case TIM_CNT: timer_val = value;