Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1704893pxb; Fri, 10 Sep 2021 11:45:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUJNMYRlygRS4g7q5J9xpm8WVZqHG09newgeTmjrXUDUJjA4HZZIBYzIOw5uMegFTMcxDC X-Received: by 2002:a92:c04f:: with SMTP id o15mr7406195ilf.310.1631299542193; Fri, 10 Sep 2021 11:45:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631299542; cv=none; d=google.com; s=arc-20160816; b=tEfWxdSaYfjGtZy/vrncIdzoQRrf9k+dU/E3f2LTawLxUeNUfIaHuuu9OCMlXnWqcL FnF+YPLIoiphuE0j69cJ76P2RbmcZamUO9p5lSOffwJrv6yXe8Tiz6bmHLUvDw1LPeFw Tu7JPW1nJNPZ0a08ZWYZYECRjyV72LcTPehnc7BLiF//IFcvA2b+20qr3/PRWhMLA3Q7 MMtyDp78+RLBy9HrVbsFHuxOXBQ94HI8i+PWzyMpQJtMlKfiscokEZKzYaij/4Pq8oBV 3Qen7LnydGVkbdiRuokYlUICwugXBEc6ZWPy5vtF6gklZSCp0EC8vm+Y4cXaKWejMU3h n6LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=nEPszmF8/zXe3qLQaYBaJlARsp+rY7T/kVvjiAAAUv0=; b=LPywU1XchbWTv+nQrwRw3+C8AjJDniVzhlOYg69FeFMd38YbpE99ksOffypMbx4PkB xTIS4k1M4ZUAApSM14N6hi1QhudfGarUDVUVPmlTvq5igRteUPeIbG0XN0IG49CF6eyw iDY+e043Ym/o+Wp/oKootA47cErsgvIkWuYXpkMzm8kKNx0+Y1sUqceSrOP8TUU8fW30 93u6XqJ/5OGxtV53nwVE2uiZUHtHYUPkdT2Xs8Xof5yHABGOGX87/Dr9UYKXyBvB5fsv MdqV4Ixpmo3fL0HNr9G0cZvaVusxtQ+1qonHJ2D+fZy5ri66GiVOJtY2vq7dGbWgK24r UAow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b="ZIZaUm/D"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t24si5082106iog.114.2021.09.10.11.45.30; Fri, 10 Sep 2021 11:45:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b="ZIZaUm/D"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232776AbhIJSqE (ORCPT + 99 others); Fri, 10 Sep 2021 14:46:04 -0400 Received: from smtp-relay-internal-1.canonical.com ([185.125.188.123]:33210 "EHLO smtp-relay-internal-1.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234187AbhIJSpg (ORCPT ); Fri, 10 Sep 2021 14:45:36 -0400 Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 25F444025E for ; Fri, 10 Sep 2021 18:44:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1631299458; bh=nEPszmF8/zXe3qLQaYBaJlARsp+rY7T/kVvjiAAAUv0=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=ZIZaUm/D8QGgJv2u0iIzucqWSUI3EaCTPZPfj/LwTF6fb7jJC2enrF+klf3W6kpDm t1GqM4d1lyEGfH/HpQywTy4/XoJJgEip5YPwTIzfAjOzpf3hWfavEI2CT3l78xVFC8 AJkr/Nkt2jziZezWYG0iPtPUbhMcpAQa6c8RXkdqAEJoF3kI1y7tjQ/qzlC8QAIf7r 2AQXTTthb5paymD9CroH5RRWGyYncU5CgLpfMMdlHY+l7T5Zfqh597YzX0WeTW8qX9 P9sgT4xTOXK5jB7LSCfx0EtHax7fD80iK+Yys5QaR9pzxo+M09RpDMskINqBMV6soU +kt+gMgeVroAA== Received: by mail-pf1-f197.google.com with SMTP id r206-20020a6276d7000000b004365c6064fbso1543755pfc.5 for ; Fri, 10 Sep 2021 11:44:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nEPszmF8/zXe3qLQaYBaJlARsp+rY7T/kVvjiAAAUv0=; b=z0wRLZyx04xSLuo8yMT4QjnjSIoR7yww8zPJFSIjiwMfQnE9II378jcJDwOcpPbHX6 n8JRwsDWOH8QX14bq3JMlbPVTihlpys2XfHOMThJomC5QW2rOIe+MjUrtoRlyB74aF80 ayg4XnygQwTwdcePl743ezCqk14oTqnZVw2JYEC5WK2NHP4tqm4bhrqGuBCW0wPNrfYo Rh393a7483kUwSoE9tUkh3KQeqg8BYUfXwn8VkAUoFmz3CHI+FLLQ1LPN0kBeRZXbIvV Tb7KaXJ2uzRYUa/D326sCkZKIHRUhD6miny4HqVOMlHZqWQnl5VN4+bTo4Wgcbzqk1pM P8Ag== X-Gm-Message-State: AOAM5328ds6JzhM3PIZ+XNEbbTzPp92AVw0iU+QDUxZwL5tdhE4aGPb1 LT9NeokFI1HYFG/fiaT0J/xNgyTmvvey0d1tLkfJPzw2VW7ReRLaj0NCb5gL0qDTLEzgt6AAJ3a AX+DKXkGEtk5crw330Y5iPm4ssUntPWnOnSCX+eXohA== X-Received: by 2002:a63:5413:: with SMTP id i19mr8424327pgb.297.1631299455509; Fri, 10 Sep 2021 11:44:15 -0700 (PDT) X-Received: by 2002:a63:5413:: with SMTP id i19mr8424312pgb.297.1631299455191; Fri, 10 Sep 2021 11:44:15 -0700 (PDT) Received: from localhost.localdomain ([69.163.84.166]) by smtp.gmail.com with ESMTPSA id l1sm5438825pju.15.2021.09.10.11.44.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Sep 2021 11:44:14 -0700 (PDT) From: Tim Gardner To: x86@kernel.org Cc: tim.gardner@canonical.com, Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "Peter Zijlstra (Intel)" , Giovanni Gherdovich , "Rafael J. Wysocki" , Vitaly Kuznetsov , Alison Schofield , Nathan Fontenot , Balbir Singh , linux-kernel@vger.kernel.org Subject: [PATCH] x86/smp: Unused value freq_scale Date: Fri, 10 Sep 2021 12:44:05 -0600 Message-Id: <20210910184405.24422-1-tim.gardner@canonical.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Coverity warns of an unused value in arch_scale_freq_tick(). CID 100778 (#1 of 1): Unused value (UNUSED_VALUE) assigned_value: Assigning value 1024ULL to freq_scale here, but that stored value is overwritten before it can be used. e2b0d619b400a ("x86, sched: check for counters overflow in frequency invariant accounting") introduced this warning. Fix this by removing the variable initializer. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: x86@kernel.org Cc: "H. Peter Anvin" Cc: "Peter Zijlstra (Intel)" Cc: Giovanni Gherdovich Cc: "Rafael J. Wysocki" Cc: Vitaly Kuznetsov Cc: Alison Schofield Cc: Nathan Fontenot Cc: Balbir Singh Cc: linux-kernel@vger.kernel.org Signed-off-by: Tim Gardner --- arch/x86/kernel/smpboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 85f6e242b6b4..c453b825a57f 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -2166,7 +2166,7 @@ DEFINE_PER_CPU(unsigned long, arch_freq_scale) = SCHED_CAPACITY_SCALE; void arch_scale_freq_tick(void) { - u64 freq_scale = SCHED_CAPACITY_SCALE; + u64 freq_scale; u64 aperf, mperf; u64 acnt, mcnt; -- 2.33.0