Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1304643rwb; Thu, 10 Nov 2022 14:17:10 -0800 (PST) X-Google-Smtp-Source: AMsMyM4Jrl+37k0xGlParzewoWlynzMsUHc8eelCFxIlA1D4W3rAJMQE/eCDGTjwravu9XasY04P X-Received: by 2002:a17:906:ce31:b0:78c:2c03:804c with SMTP id sd17-20020a170906ce3100b0078c2c03804cmr4126732ejb.107.1668118630257; Thu, 10 Nov 2022 14:17:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668118630; cv=none; d=google.com; s=arc-20160816; b=Mz6ViBh+gqsAajAnXS0dW6yXROC5WViBMeNdrc6nHkvcl6XqRAr7ATBPxUtkjHkU38 1fYQe8nu0Y8H+lpUV/17VMjSzBzTZmrd6UdSh2rFSHcS4v9cgLkt6Yu+ngBG3rTwqZoL ov2uLUqTXMSwrdntwHLIvzaQxW2RouXqlVJ60o056tp/3xUQeD1VO3ckODezWOEGKTdh rhUnKTILiWiEFoD7NPsxlAe5pDkakfCIl8VtKjvoTbfx2geyKWm1Y8ZjI02XSMj160BA XW9U09v3+1HyhCivA92NNc/TZpHoncj6elFkA+exu7smrIUAyIyNCsHt/1ZE5NL9+lc4 cKRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=a34ppdWbivNAxs0hZgRllXVIJs8hvYA2VZe5Kyhs1OM=; b=YB6tt6wJcJhvcPY3CA2wod97tPkPvL61mrDwhhc0NhGTYaPm/Dr1jOEmUy/SEeZv06 /u75XmpbStOgf3HsdFB1B2O6slecobYhNKO1LBJ1TMdGu66bRybAEl0o7f9OxrG+ZkPM meOuHOajBA76RRoTvOmo/plLCc8LOhCS/TLOKHfXfrHFXUB/lSrwwPkcwdkQQcJyvzGB NdHcYuyyetPKURElCJdTI3sGXXlDTNocBKL5RpM7CedsX53Yq4lNkg9Z0UV+FXJsoCOU /5CwntY1Mj3F99p7/dQY7pwh6yDtUuSt5lvcRptyspF0m1E2x5tPFn0eNc5wp7Gnt7BW hgNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=P6vqEdFm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a3-20020a509b43000000b004602a1b7da9si715334edj.133.2022.11.10.14.16.41; Thu, 10 Nov 2022 14:17:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=P6vqEdFm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230232AbiKJWFQ (ORCPT + 92 others); Thu, 10 Nov 2022 17:05:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229531AbiKJWFO (ORCPT ); Thu, 10 Nov 2022 17:05:14 -0500 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C986219 for ; Thu, 10 Nov 2022 14:05:14 -0800 (PST) Received: by mail-pj1-x1031.google.com with SMTP id m6-20020a17090a5a4600b00212f8dffec9so3124393pji.0 for ; Thu, 10 Nov 2022 14:05:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=a34ppdWbivNAxs0hZgRllXVIJs8hvYA2VZe5Kyhs1OM=; b=P6vqEdFmeiejzHVbCjsfMpsQ29zuzTvwlvxMocFOI12tWCjBgBJRuRlA+3jh1ZXKMJ pKwCFuHwJg0GAlwoZUSh+uPcDwx6PD7PMLM78itRlOqjv9aJ6DEiluMK2qYiBzIXn4ff hPrcfEgTfO6Vnm2bGWzIyCbABoCOD/OOkD0GKHd8QfQaiX2UXizd45S+gUzReYaIso5K +6EFD/K2fB668OQhEkpkTtm8DdTAcVBLQxxxLCfPnFsQ9BpxubAIuD9RGxjUG96z2hvs C1sBF2PRjlxLQuF8ilQGh7Z8EhhwqXBhoEY5b76cHp7gHNRdprJR//0/dKheg/k4/s7U AYhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=a34ppdWbivNAxs0hZgRllXVIJs8hvYA2VZe5Kyhs1OM=; b=ET3LFp/it4gu7f00CrmaUF3l8RtrQnAOXR9bZzBsk1pIgo2zSITcGZpwYc6sZnhZXM CPsxIzKN0zn8QIyV3fnAtYGJBFwXxtYtRVtFupaStp+WYRvG1JUw+h+ekYcCUrsz6Kwb PFgfC4VwSp3HQy6C+dI6bQBJ16VkP2xq9vL6Kb61ZFbgVCm7Ew+6gOtm81VtCAZoKE/E Cd0rhqjo87CNi8HUdczPLY97/Y1+2q6xNIPRZ/KnXCFBOIfiV7d3zFJh5BgX7kifGg6j fvkxCCodONDieJkAe1x5FeUUtGqXf4dr9JAyH2xLfwCK38ZBFN6ApY/hdE3zonS7ExFx 3DJQ== X-Gm-Message-State: ACrzQf1djPxEcaUGH+mVEAPNdi+ghilvZNr4sE5iO1WjIiEb4eIk7QRg wVReLR3BBkmT/CeZ9EinVWwk44Tt/cjmaGtLqzH7pA== X-Received: by 2002:a17:902:7b98:b0:186:8558:ded2 with SMTP id w24-20020a1709027b9800b001868558ded2mr2238985pll.95.1668117913389; Thu, 10 Nov 2022 14:05:13 -0800 (PST) MIME-Version: 1.0 References: <20221108170103.3375832-1-nathan@kernel.org> In-Reply-To: <20221108170103.3375832-1-nathan@kernel.org> From: Nick Desaulniers Date: Thu, 10 Nov 2022 14:05:01 -0800 Message-ID: Subject: Re: [PATCH] cpufreq: ACPI: Remove unused variables 'acpi_cpufreq_online' and 'ret' To: Nathan Chancellor Cc: "Rafael J. Wysocki" , Viresh Kumar , Stuart Hayes , Tom Rix , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 8, 2022 at 9:01 AM Nathan Chancellor wrote: > > Clang warns: > > drivers/cpufreq/acpi-cpufreq.c:970:24: error: variable 'ret' is uninitialized when used here [-Werror,-Wuninitialized] > acpi_cpufreq_online = ret; > ^~~ > drivers/cpufreq/acpi-cpufreq.c:960:9: note: initialize the variable 'ret' to silence this warning > int ret; > ^ > = 0 > 1 error generated. > > Both ret and acpi_cpufreq_online are now unused so they can be safely > removed, clearing up the warning. > > Fixes: 13fdbc8b8da6 ("cpufreq: ACPI: Defer setting boost MSRs") > Link: https://github.com/ClangBuiltLinux/linux/issues/1757 > Signed-off-by: Nathan Chancellor Thanks for the patch! Reviewed-by: Nick Desaulniers > --- > drivers/cpufreq/acpi-cpufreq.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c > index c8fdfcf659e6..74ef0e05ff7b 100644 > --- a/drivers/cpufreq/acpi-cpufreq.c > +++ b/drivers/cpufreq/acpi-cpufreq.c > @@ -953,12 +953,8 @@ static struct cpufreq_driver acpi_cpufreq_driver = { > .attr = acpi_cpufreq_attr, > }; > > -static enum cpuhp_state acpi_cpufreq_online; > - > static void __init acpi_cpufreq_boost_init(void) > { > - int ret; > - > if (!(boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA))) { > pr_debug("Boost capabilities not present in the processor\n"); > return; > @@ -966,8 +962,6 @@ static void __init acpi_cpufreq_boost_init(void) > > acpi_cpufreq_driver.set_boost = set_boost; > acpi_cpufreq_driver.boost_enabled = boost_state(0); > - > - acpi_cpufreq_online = ret; > } > > static int __init acpi_cpufreq_init(void) > > base-commit: 21cdb6c18f85fe538ca8740bc79f11fbe08d0197 > -- > 2.38.1 > -- Thanks, ~Nick Desaulniers