From nobody Sun Nov 24 16:38:40 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=1722264388; cv=none; d=zohomail.com; s=zohoarc; b=klbB4UzmC8E6AtMRLWPHmL08iWBTq40tEKVQkI0+uuLmgA5pprt02JkS6jU3zeJuMWd1sG1uXeuHo4OCM7tfLjYg3RGzipJ/pdXKTywN3AT4yU5ROAv4p8ePxZ0Hg1jqv2kVB+U2lzYXpWFclx8qV5xaSabAGahJ3DJX33ZC2Gg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722264388; 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=Pge7513nKBshjtyBdFZgBKyCSQ2SDh37JkBFhtHAoCg=; b=cxOj9xkZbVC/URhvnaDmY0Ycjcv6BCgXgj3wJ6hJyJ/U1CHYp9YcfP+9sKAhyPGKkDc6SbS1MElyHJZD5EbDNtkTZ5ZxEuH1NUfGiJWtKs/4l37crL65B05815R41wp9VsngrnO/LEA4zm+pczm6PZUpeptNIZA8Nd5W6ViSvPI= 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 1722264388331355.0125420155605; Mon, 29 Jul 2024 07:46:28 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYRc5-0004f9-Ep; Mon, 29 Jul 2024 10:44:37 -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 1sYRc2-0004Tt-Un for qemu-devel@nongnu.org; Mon, 29 Jul 2024 10:44:34 -0400 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYRbu-0008Qt-1m for qemu-devel@nongnu.org; Mon, 29 Jul 2024 10:44:34 -0400 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-59589a9be92so5517642a12.2 for ; Mon, 29 Jul 2024 07:44:25 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acab23f62sm521017766b.16.2024.07.29.07.44.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 07:44:19 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 2B5B55FA0F; Mon, 29 Jul 2024 15:44:16 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722264264; x=1722869064; 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=Pge7513nKBshjtyBdFZgBKyCSQ2SDh37JkBFhtHAoCg=; b=Z2CEoM92tEPrgbCv3G50GCaNNquDrhaqb4Z0df7ZkDIsSxjJ0ETU21NAsdmg+nILnL gVxhZnsv3UI+F/J508GHpeIHpAb989zcwmX1YaWL3CiKt4+TiMvu9USOw9a0OgZMthrY 8mTAspm3gqmGpJ9s9OnUxAa7uw/3TNUZy9URbE7UgA6we/4K/snleCP1FGMqLpQf0iqm wKR2i6BvKfmNB1cIWULU/wV3GMMDuKd8GXgoaBeHSnQHLNR8ufHS1dxlH9Pwl8wNOoVW vCE8yQkTzabAwJr+1DHmHt/2hwi6UlugfNKHVf30pt/oFK6qKgtzIj1PV90gsOtCvqZY pO/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722264264; x=1722869064; 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=Pge7513nKBshjtyBdFZgBKyCSQ2SDh37JkBFhtHAoCg=; b=m/jCLjm8TAYJ5Oz3C/6ou/bsvhgtfB1IeY8dNl+j3+ns2TOeiQIgwvBCdH40NpW+wZ KZLbx9iKRIwzpJM41ZCjywVuV329TUeMlMtaPdGMiFDYsagjj0os39caGjTyOwzEs708 zNOZicHEohmHHwkrFloIjZOTjdc+eqcbZ8mIMdMIOGWv3AXeY3GBYf/OPcToUeOG7Rtx LbekSaHZgaW59u667lCVWXWxUfrF/A9ep1X+Nws1z55yzsLlzPq4Yv7YXitqX2yfLVdf +HLQ+Q3oXAFoVYTn0SVkm5sqvryJvckfOCkAKtcmNNLpNaALHcanp+gfRonHcC1TSU9R w2iA== X-Gm-Message-State: AOJu0YyhGZa1W6u58F/tUmkVUY7sVitd5YP1P3Xf4qRkEZ3wzwlkHqtH gy53oktokv48DQP7jzpI00JTuJce974ctvtbPowJyvaRYEsu3jwCbChuUUCWRI0= X-Google-Smtp-Source: AGHT+IEsWFJLPqGVDsePmlOLfsx8ltOW1GIOJELld/RlChVzU5ZaLow5qjhWmwCesZntknV+adzZ2Q== X-Received: by 2002:a17:907:96a0:b0:a72:7da4:267c with SMTP id a640c23a62f3a-a7d3ffa612bmr624237466b.12.1722264264369; Mon, 29 Jul 2024 07:44:24 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , Thomas Huth , Beraldo Leal , Palmer Dabbelt , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Bin Meng , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-riscv@nongnu.org, Weiwei Li , Pierrick Bouvier , Peter Maydell , Richard Henderson , Liu Zhiwei , Daniel Henrique Barboza , qemu-s390x@nongnu.org, Cleber Rosa , Ilya Leoshkevich , Mahmoud Mandour , qemu-arm@nongnu.org, Alexandre Iooss , Song Gao , David Hildenbrand , Alistair Francis , Wainer dos Santos Moschetta Subject: [PATCH 11/14] contrib/plugins/cache.c: Remove redundant check of l2_access Date: Mon, 29 Jul 2024 15:44:11 +0100 Message-Id: <20240729144414.830369-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240729144414.830369-1-alex.bennee@linaro.org> References: <20240729144414.830369-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::52c; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52c.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: 1722264389911116600 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> Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson --- contrib/plugins/cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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