From nobody Sun Nov 24 15:35:19 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1722356661; cv=none; d=zohomail.com; s=zohoarc; b=LdmLryaBt3EgGsV81eJJ/4oqvuCM+fNxnJMzzhOuSb1gEV44E46JZ3GMdnWj3vgsgfuM3l+r73jjI8WMkU+tLtNy5ui4hcn4ZO9JZ/5vVmLyAtHcuWeVfn4s5oH2BChEcryuxVyneRxizMu4WhhWNTJkY3DjyouX0k2qmjUdjKM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722356661; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=xzDMp496rGrP+ZJVpvdPMnx/krw5GVt88UpcZ2FrH9M=; b=IV+sQjO8tGP/juDkQgSl1e2n6H41stF7EJBMNvk4YhvXV4AfAadKEBU4oH33KyD86yNC23UzUlAB3QY4eE/XYYd5wT+U7kq8CGu/ZbZkAesXXI3t+GMu4am+L0ilfL0NpzkJEKVo0Wmq4kCxe1Eta77qd4FV2de/HBMDF5mo1NE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 172235666191361.043005820845565; Tue, 30 Jul 2024 09:24:21 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYpcj-0000HV-CU; Tue, 30 Jul 2024 12:22:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sYpch-00009W-LB for qemu-devel@nongnu.org; Tue, 30 Jul 2024 12:22:51 -0400 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYpcg-0003Z9-5w for qemu-devel@nongnu.org; Tue, 30 Jul 2024 12:22:51 -0400 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-52efc60a6e6so7645535e87.1 for ; Tue, 30 Jul 2024 09:22:49 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acab23132sm663923866b.27.2024.07.30.09.22.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jul 2024 09:22:45 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id E170C5FA0C; Tue, 30 Jul 2024 17:22:38 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722356568; x=1722961368; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xzDMp496rGrP+ZJVpvdPMnx/krw5GVt88UpcZ2FrH9M=; b=NWMXmfdjrxQOlAcs/nJvuzluGuwDzkB4Mw+7nb6K6qOFxXVuLqAuFdoCNfHz2OJqQH iybK/h9y2978wsKjc4qortPWYBRuYh+RcaoOP53mYhnjYIXPTGRltzBMGGUQLNcudqdx /j309EhMo5eNgknba3Q6GPVU+9LPD/S6ZGFaAUouiJLpUPzezKxvJpYXaO5P1O6LPCAR +srFLsOO0PFXUb7Whg54SpdZe6FzIxUQNW0BufOuhYXmOtAXckWdd9q6Pf3vJhW+9gkX izbg2JeO7U7kdJQCm1QxuBbgND4rQ9B7R3BGuLVmTD+SefdkrU0TfnpNicf1apmFQb/r /YyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722356568; x=1722961368; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xzDMp496rGrP+ZJVpvdPMnx/krw5GVt88UpcZ2FrH9M=; b=pyJd3YB8D/pRITnFG48kuATFJG7+hleaP1ulSuD+fIE+sn+KAQ81H//Z3JyhQ95x4J uQliRZMZwOkptbkmm04cZ5ZosMqxAD39TrG4iT7Tfs06mHdsGtQfII7thy33qXRvHkLr tiYKt0E/tMQuNPZ8nZxW7crqwvBSk+a1IBkrHBOIMztaW4OVHPDkxC+R9XOU5V2KvF0o dGRNZ8fJJpaetGAtGBuQ0IDWt7hl39CgCk1RltJvepPhukHE2OJpa5XMMXorcg3IcA0f ITZ55bR0vt6pmgXRL8JHqLl8quqFkYuZGYRqgGqRJNCoqVmGGSGnIChnjxIFdoNxjpum +ftg== X-Gm-Message-State: AOJu0Yxi2GJfnoaBOjGBAKyRbTT5IalZGm3JDhw7hd80AZuUP5Kq440H wgeBANFS9/ZI7B/zlLBnkce8KEZYcueEUnI/3bE+iENA6yNkGbzQZrmzWlSsWfY= X-Google-Smtp-Source: AGHT+IFhdvbNCMBjCEL74dY7Ca07Nb/jYB8vyIk9yJj9fiKvo5Vfh+bkyn0xF0SuautsuWHoKcVzfw== X-Received: by 2002:ac2:5051:0:b0:52c:df8c:72cc with SMTP id 2adb3069b0e04-5309b2bb607mr6887766e87.43.1722356567823; Tue, 30 Jul 2024 09:22:47 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Alexandre Iooss , Mahmoud Mandour , Pierrick Bouvier Subject: [PULL 11/14] contrib/plugins/cache.c: Remove redundant check of l2_access Date: Tue, 30 Jul 2024 17:22:34 +0100 Message-Id: <20240730162237.1425515-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240730162237.1425515-1-alex.bennee@linaro.org> References: <20240730162237.1425515-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::135; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x135.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1722356663187116600 From: Peter Maydell In append_stats_line(), we have an expression l2_access ? l2_miss_rate : 0.0 But this is inside an if (l2_access && l2_misses) { ... } block, so Coverity points out that the false part of the ?: is dead code. Remove the unnecessary test. Resolves: Coverity CID 1522458 Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20240725164851.1930964-1-peter.maydell@linaro.org> Reviewed-by: Richard Henderson Signed-off-by: Alex Benn=C3=A9e Message-Id: <20240729144414.830369-12-alex.bennee@linaro.org> diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c index c5c8ac75a9..512ef6776b 100644 --- a/contrib/plugins/cache.c +++ b/contrib/plugins/cache.c @@ -558,7 +558,7 @@ static void append_stats_line(GString *line, " %-12" PRIu64 " %-11" PRIu64 " %10.4lf%%", l2_access, l2_misses, - l2_access ? l2_miss_rate : 0.0); + l2_miss_rate); } =20 g_string_append(line, "\n"); --=20 2.39.2