Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp3283657lfo; Mon, 23 May 2022 00:40:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTGh6WuWa35dvFz0ngyjKMes0ciUXgAyOz76J5Wn5rliXHqvYBbAxXXQkYbJQbssrxtTjy X-Received: by 2002:a17:903:248:b0:155:e8c6:8770 with SMTP id j8-20020a170903024800b00155e8c68770mr20968792plh.129.1653291604578; Mon, 23 May 2022 00:40:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653291604; cv=none; d=google.com; s=arc-20160816; b=maIoiCL+CsWe+oIOVklrFb/yxXpKpN/smo9g3Ke6N7moiBwUI8Zc453iw6LDxUc3Qc 0sfJpFFU003Bj1yjJfc12CvoLoqIfesRLB0pdRlOElW0fWvP80+0Sul9Tkgt5AHufBki n2jUxc9l1B7YAFrvmyZmkEnIWn7s46CF5k+mBgmjDS90sVQT3fpnT/3sFAO+Ce6tXflO M925OvAE7Dq/L2pWDIZ51n/dgkhpRJRYfAQaPe74scN9ElRU+6EQU78QDu9+KkSeGWRh oGM7ymTPW191Obqo0LJJCv7ziJt97vkbsiix+8EZAPSey2Vlp9LYpOD8GEKgnwVwLQ3s /jTA== 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; bh=9dtZskCTZYyFhz4KDasqG/parbHrwcurnWaOcOHsKr0=; b=Aih+SvGyWG1pfk8YT/KYn+sVgaY8n3o7x73cfAyFxUH7lbVxIphHswJQQiYcyc4Y1N wgmyZZXHcLLJTd2+1GPG3kz3VGPKcmhh1fblZLPWvV19r50xGWxphhBs5YMNkcK26E+v Aqn+kkygJ794NqiumwUS2Ioc++D0V8QXG0/4CeJ1nJnzfb7jvcDVxFInHFOB7wtGVfjI tkOPBwf/XzpSL4aSYMj9p2hPn1C29jpdLk6HDNqIR9BbH7mUF28i0OXtT42XhhDvHlrN HyUutNo3CgCmqNVo5GPx5pbSCXGUwvrr9sDFTXM8s+h5jPYPQtrqJ0f8xvySBn/x6ErN lDJQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id s70-20020a632c49000000b003fa74c5ecf9si1568868pgs.588.2022.05.23.00.39.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 00:40:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C15D11402A; Sun, 22 May 2022 23:46:54 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239508AbiEUDLP (ORCPT + 99 others); Fri, 20 May 2022 23:11:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239550AbiEUDLB (ORCPT ); Fri, 20 May 2022 23:11:01 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE5EB1583B; Fri, 20 May 2022 20:10:59 -0700 (PDT) Received: from kwepemi500015.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4L4pVz44DVzhYx0; Sat, 21 May 2022 11:10:19 +0800 (CST) Received: from huawei.com (10.175.127.227) by kwepemi500015.china.huawei.com (7.221.188.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Sat, 21 May 2022 11:10:57 +0800 From: Zheng Bin To: , , , , CC: , Subject: [PATCH -next] cpufreq: CPPC: Fix build error without CONFIG_ACPI_CPPC_CPUFREQ_FIE Date: Sat, 21 May 2022 11:24:38 +0800 Message-ID: <20220521032438.2504155-1-zhengbin13@huawei.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.175.127.227] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemi500015.china.huawei.com (7.221.188.92) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 If CONFIG_ACPI_CPPC_CPUFREQ_FIE is not set, building fails: drivers/cpufreq/cppc_cpufreq.c: In function ‘populate_efficiency_class’: drivers/cpufreq/cppc_cpufreq.c:584:2: error: ‘cppc_cpufreq_driver’ undeclared (first use in this function); did you mean ‘cpufreq_driver’? cppc_cpufreq_driver.register_em = cppc_cpufreq_register_em; ^~~~~~~~~~~~~~~~~~~ cpufreq_driver Make declare of cppc_cpufreq_driver out of CONFIG_ACPI_CPPC_CPUFREQ_FIE to fix this. Fixes: 740fcdc2c20e ("cpufreq: CPPC: Register EM based on efficiency class information") Signed-off-by: Zheng Bin --- drivers/cpufreq/cppc_cpufreq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c index 3eaa23d1aaf5..1837f2ce8243 100644 --- a/drivers/cpufreq/cppc_cpufreq.c +++ b/drivers/cpufreq/cppc_cpufreq.c @@ -61,6 +61,8 @@ static struct cppc_workaround_oem_info wa_info[] = { } }; +static struct cpufreq_driver cppc_cpufreq_driver; + #ifdef CONFIG_ACPI_CPPC_CPUFREQ_FIE /* Frequency invariance support */ @@ -75,7 +77,6 @@ struct cppc_freq_invariance { static DEFINE_PER_CPU(struct cppc_freq_invariance, cppc_freq_inv); static struct kthread_worker *kworker_fie; -static struct cpufreq_driver cppc_cpufreq_driver; static unsigned int hisi_cppc_cpufreq_get_rate(unsigned int cpu); static int cppc_perf_from_fbctrs(struct cppc_cpudata *cpu_data, struct cppc_perf_fb_ctrs *fb_ctrs_t0, -- 2.31.1