From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D3A612E7F00 for ; Tue, 2 Sep 2025 15:29:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756826957; cv=none; b=EQ9z1roPTyon/lgg28J50meD16HOLVo/K/p0/YE78TIpuCl1Au9o9XmvNyxwKgcDrSSEkDJ/C05qCaS5QVJ7xvh/H8INCrLgoS81z82DOtCjDWyQSLyrsV4A2QszhF9cxaUbNRyY8v04ISWNyUgXZDGV6H2e/1ngW5j3PUenzWo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756826957; c=relaxed/simple; bh=nEIioeZAk/Seq6SNU7vaOhcDdx/3N7kgSkiNzcHuqmQ=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=o83ZXsFQie3VN+JFpWreIBNIwRE9EQJYBlYU8+whmgmCa+mneHmAcWsQ8RbAAjwHLoj/UFbUh2AOFQONge8OckJ/w4OxYvWijyQV7kk/lLH/sV0B7TmxNuM4gU+TQXmOvpBbLsxt+NLY9on+ukfweNAobIDroNZr2R1crCvi5YM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=FyESfT3o; arc=none smtp.client-ip=198.175.65.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="FyESfT3o" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1756826956; x=1788362956; h=date:from:to:cc:subject:message-id:mime-version; bh=nEIioeZAk/Seq6SNU7vaOhcDdx/3N7kgSkiNzcHuqmQ=; b=FyESfT3oP1JINxzZLriw/b7Vkjeu9QjjIX+A9XbvtFTeCZooyUfkCtLp xwxaSTAn7okvZF5dRT0Eqjk2EIB8jm0AjC70j5wYrX3e4rqtcLEFx4FkJ Ag0gCT4ZJmhOXVTjWpqAABtDhhmME/yMLRC4ZRzQYXx/lD80ZdNVwvCFn gsOMysrmu0RnzrE2Ik5lJiRwTOOKZrnOWHoojO9SWofRyJ8opEkNAKjFk dfrBtLCRnPPQENpXC7wHVCNcPTLNuejVQSYdjuprRcCZPPhJmL6rkv8tm 52Z4VktBWmt5eXHkePCJtUms79xmFtGn5aptyc3rvmLmrUxNdiuEcUK7T Q==; X-CSE-ConnectionGUID: uaNoGtxqQ5KV/Dndq3LSgw== X-CSE-MsgGUID: erTl+VYpQh+Omvp0fkuzTA== X-IronPort-AV: E=McAfee;i="6800,10657,11541"; a="59243834" X-IronPort-AV: E=Sophos;i="6.18,230,1751266800"; d="scan'208";a="59243834" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2025 08:29:16 -0700 X-CSE-ConnectionGUID: VQbnDNWQQMmi60QaTXcZUQ== X-CSE-MsgGUID: qFhXktzaQcmGrjdvYMVK/A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.18,230,1751266800"; d="scan'208";a="170600007" Received: from lkp-server02.sh.intel.com (HELO 06ba48ef64e9) ([10.239.97.151]) by orviesa010.jf.intel.com with ESMTP; 02 Sep 2025 08:29:14 -0700 Received: from kbuild by 06ba48ef64e9 with local (Exim 4.96) (envelope-from ) id 1utSuX-0002gn-0u; Tue, 02 Sep 2025 15:27:44 +0000 Date: Tue, 2 Sep 2025 23:25:13 +0800 From: kernel test robot To: oe-kbuild@lists.linux.dev Cc: lkp@intel.com, Dan Carpenter Subject: Re: [PATCH v3 12/12] PM: EM: Use scope-based cleanup helper Message-ID: <202509022308.CeaKUqJM-lkp@intel.com> Precedence: bulk X-Mailing-List: oe-kbuild@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline BCC: lkp@intel.com CC: oe-kbuild-all@lists.linux.dev In-Reply-To: <20250901085748.36795-13-zhangzihuan@kylinos.cn> References: <20250901085748.36795-13-zhangzihuan@kylinos.cn> TO: Zihuan Zhang TO: "Rafael J . wysocki" TO: Viresh Kumar TO: Catalin Marinas TO: Will Deacon TO: Borislav Petkov TO: Dave Hansen TO: Srinivas Pandruvada TO: Michael Ellerman TO: Krzysztof Kozlowski TO: Alim Akhtar TO: Thierry Reding TO: MyungJoo Ham TO: Kyungmin Park TO: Chanwoo Choi TO: Jani Nikula TO: Rodrigo Vivi TO: Tvrtko Ursulin TO: David Airlie TO: Simona Vetter TO: Daniel Lezcano TO: Sascha Hauer TO: Shawn Guo TO: Eduardo Valentin TO: Keerthy CC: Ben Horgan CC: zhenglifeng CC: Zhang Rui CC: Len Brown CC: Lukasz Luba CC: Pengutronix Kernel Team Hi Zihuan, kernel test robot noticed the following build warnings: [auto build test WARNING on rafael-pm/linux-next] [also build test WARNING on rafael-pm/bleeding-edge rafael-pm/thermal arm64/for-next/core linus/master v6.17-rc4 next-20250902] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Zihuan-Zhang/arm64-topology-Use-scope-based-cleanup-helper/20250901-170106 base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next patch link: https://lore.kernel.org/r/20250901085748.36795-13-zhangzihuan%40kylinos.cn patch subject: [PATCH v3 12/12] PM: EM: Use scope-based cleanup helper :::::: branch date: 30 hours ago :::::: commit date: 30 hours ago config: powerpc64-randconfig-r071-20250902 (https://download.01.org/0day-ci/archive/20250902/202509022308.CeaKUqJM-lkp@intel.com/config) compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 2e122990391b2ba062e6308a12cfedf7206270ba) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202509022308.CeaKUqJM-lkp@intel.com/ smatch warnings: kernel/power/energy_model.c:454 em_cpufreq_update_efficiencies() error: uninitialized symbol 'policy'. kernel/power/energy_model.c:454 em_cpufreq_update_efficiencies() error: uninitialized symbol 'policy'. vim +/policy +454 kernel/power/energy_model.c 1bc138c6229599 Lukasz Luba 2020-06-10 449 e7b1cc9a7ea6d7 Lukasz Luba 2024-02-08 450 static void e7b1cc9a7ea6d7 Lukasz Luba 2024-02-08 451 em_cpufreq_update_efficiencies(struct device *dev, struct em_perf_state *table) e458716a92b57f Vincent Donnefort 2021-09-08 452 { e458716a92b57f Vincent Donnefort 2021-09-08 453 struct em_perf_domain *pd = dev->em_pd; 3a096464b04b72 Zihuan Zhang 2025-09-01 @454 struct cpufreq_policy *policy __free(put_cpufreq_policy); e458716a92b57f Vincent Donnefort 2021-09-08 455 int found = 0; 99907d6054f2d3 Lukasz Luba 2024-02-08 456 int i, cpu; e458716a92b57f Vincent Donnefort 2021-09-08 457 e7b1cc9a7ea6d7 Lukasz Luba 2024-02-08 458 if (!_is_cpu_device(dev)) e458716a92b57f Vincent Donnefort 2021-09-08 459 return; e458716a92b57f Vincent Donnefort 2021-09-08 460 99907d6054f2d3 Lukasz Luba 2024-02-08 461 /* Try to get a CPU which is active and in this PD */ 99907d6054f2d3 Lukasz Luba 2024-02-08 462 cpu = cpumask_first_and(em_span_cpus(pd), cpu_active_mask); 99907d6054f2d3 Lukasz Luba 2024-02-08 463 if (cpu >= nr_cpu_ids) { 99907d6054f2d3 Lukasz Luba 2024-02-08 464 dev_warn(dev, "EM: No online CPU for CPUFreq policy\n"); 99907d6054f2d3 Lukasz Luba 2024-02-08 465 return; 99907d6054f2d3 Lukasz Luba 2024-02-08 466 } 99907d6054f2d3 Lukasz Luba 2024-02-08 467 99907d6054f2d3 Lukasz Luba 2024-02-08 468 policy = cpufreq_cpu_get(cpu); e458716a92b57f Vincent Donnefort 2021-09-08 469 if (!policy) { 4274521fabee05 Lukasz Luba 2024-02-08 470 dev_warn(dev, "EM: Access to CPUFreq policy failed\n"); e458716a92b57f Vincent Donnefort 2021-09-08 471 return; e458716a92b57f Vincent Donnefort 2021-09-08 472 } e458716a92b57f Vincent Donnefort 2021-09-08 473 e458716a92b57f Vincent Donnefort 2021-09-08 474 for (i = 0; i < pd->nr_perf_states; i++) { e458716a92b57f Vincent Donnefort 2021-09-08 475 if (!(table[i].flags & EM_PERF_STATE_INEFFICIENT)) e458716a92b57f Vincent Donnefort 2021-09-08 476 continue; e458716a92b57f Vincent Donnefort 2021-09-08 477 e458716a92b57f Vincent Donnefort 2021-09-08 478 if (!cpufreq_table_set_inefficient(policy, table[i].frequency)) e458716a92b57f Vincent Donnefort 2021-09-08 479 found++; e458716a92b57f Vincent Donnefort 2021-09-08 480 } e458716a92b57f Vincent Donnefort 2021-09-08 481 e458716a92b57f Vincent Donnefort 2021-09-08 482 if (!found) e458716a92b57f Vincent Donnefort 2021-09-08 483 return; e458716a92b57f Vincent Donnefort 2021-09-08 484 e458716a92b57f Vincent Donnefort 2021-09-08 485 /* e458716a92b57f Vincent Donnefort 2021-09-08 486 * Efficiencies have been installed in CPUFreq, inefficient frequencies e458716a92b57f Vincent Donnefort 2021-09-08 487 * will be skipped. The EM can do the same. e458716a92b57f Vincent Donnefort 2021-09-08 488 */ e458716a92b57f Vincent Donnefort 2021-09-08 489 pd->flags |= EM_PERF_DOMAIN_SKIP_INEFFICIENCIES; e458716a92b57f Vincent Donnefort 2021-09-08 490 } e458716a92b57f Vincent Donnefort 2021-09-08 491 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 71A38304BD5 for ; Tue, 2 Sep 2025 15:53:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756828408; cv=none; b=fB1KeyTf0AKUQQLSC5KjPlweX8OzHvrffMHbA7qmvZtRsYUt8Lz/z1kbBweHYPj1yquQS/1wTDfsiCpDz0H9VtNnRP0mnNv7geqj9nS4EJ/VORlKP16Nld86wSaGx0OvD8V5bT5BU3WuuJrVIjPyKeAuBL+Czsq89GTkkJT1Dpk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756828408; c=relaxed/simple; bh=Y9KEkNBEdaCc1a1sw/0mEPi5JZRP391wQMPRK6mbkYs=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=MTkPOa1trvj+7AC0XzME/9/6llcUr+n+9vYhxPNQ6BTtSotiPSKWc23V4B3S6RI2CE6dmvO4w50lA2OmN0TROA028D9clw6o1TAPnjaLIH2RWTXBc+DomOxuxJz0Ody5QT1BGhIzCWKb4RKdgLdj5MKr/QcMb2R29vXb+QLFjPY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=kDE1Lyr1; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="kDE1Lyr1" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-45a1b065d59so38432625e9.1 for ; Tue, 02 Sep 2025 08:53:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1756828405; x=1757433205; darn=lists.linux.dev; h=in-reply-to:content-disposition:mime-version:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=kJaZxrOsdhyiABPvNpYJfbVgADxdvTvuGMZtJ7RHsGk=; b=kDE1Lyr12tzqNMNheB2zgAm4USjWVrkGlK3BtGsuufs520oka07VwcnNCIOoQt3M1+ BPpfc0Oh4Bu4lbcVDcuZvvXybkFq2PHkMpPLfcKF/iUlAr/QpfvfPKSaT175mBhm+RkO yvEow1q/Ui17cj7szxmxhU9nhKA0xkCKsOjw2WD2PS0bvfutwM751HyTkJDi5aBE2M+B creNYLh09Sf8PQKNzlYSZZI1BvZatrYoIqj2NOf2qHXqQBXK3RbuhFPAurtUaOUTPMEL NVuIw+2w1ZxDRARu9IMoPQpyduu/9MYARrBlQG4aYmrXf7qMiy/MBkKorAj/O1rZBt1V sj4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756828405; x=1757433205; h=in-reply-to:content-disposition:mime-version:message-id:subject:cc :to:from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=kJaZxrOsdhyiABPvNpYJfbVgADxdvTvuGMZtJ7RHsGk=; b=ma0D8QDs63bWnxG8yWdDyF43apZ7HAJ41pk/Mx67iMhj03S9mI6nS7Ik5gOfY/BlsJ JBOM+n21DKdHxzmD986GeASITee5/0qGgEQPjR+R04Y93xgyXTEWR4Scnytlx2ReAxjW zGkQn6mttIQ9eSstCmmPr4a5Tdr+Mw0Ujn0o4wQV7JGE0aDIZyJB3jjViiF7IKLx2eFe IAKJCdEHamryUbbn/vrZ1aXycKHF97ATxZnO++4/fLT9v8PP5J606N8z7l8z9IUIuTcM Ef2qU25JfFQbTeSkfMuJSlm+GpKopBX8Qp9PxUQyKBY9UbX5cjzUdK6RwX1Zsj46ljnL T+Zg== X-Gm-Message-State: AOJu0YwHbSiEwmbnOmrybj+nzUtNbh7wm5jwtyXtQ1eEWOLAHhqAlVf8 Ev2mlj6aDpMXBGk65eMEb476GCKcT+bPtvhwHDSztpAq/Iy7ZSEU62HgY7vy+Jhhdek/brIDfVC PMv9J X-Gm-Gg: ASbGnct+yEwGuBxI1MdnnDTIYLesqIeFtNyNPguTr9jwbzzh/4/j9kykH2uYhwOuwZG zqJi2AYioFYWLh6jnRuTSM4c+oRulbhITKv/cbFqo9f+sRk4ubOuOmOn3p97tzZqlydWy+XSGkp 5TSRN5LksfVcXVgXswBAkSAYbpDyeszkycO4GDTr9UtjJ7zVWviZ0P9Jde/nPBeeOCT+qpVA6k+ IVnnYNkrPblXC+anxr9sTWR0DagrRjeBHJHPDjWD+ncuW3AaL2fp/IVqffIqj7hLXaIKAr73izA wxZjWR3NNuh+LXKGx+GlYjXOqxSzfITxpG5vefHezP22WHGsqvbhn9R8ds4fvCqF+m9V9cRyLdA ygEQtIGmqmGeg7yYMR6lLOVLp/oI= X-Google-Smtp-Source: AGHT+IHKaTeLcXrc9oz4Am392RK8uRis5Zrd/kbBkzlvAa0EGTnOvu7xZRd/4WX3gyF0+iqaP5ci4g== X-Received: by 2002:a05:600c:3b01:b0:45b:88c6:709d with SMTP id 5b1f17b1804b1-45b88c67339mr80810175e9.25.1756828404547; Tue, 02 Sep 2025 08:53:24 -0700 (PDT) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-45b73c52735sm265052305e9.22.2025.09.02.08.53.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Sep 2025 08:53:24 -0700 (PDT) Date: Tue, 2 Sep 2025 18:53:20 +0300 From: Dan Carpenter To: oe-kbuild@lists.linux.dev, Zihuan Zhang , "Rafael J . wysocki" , Viresh Kumar , Catalin Marinas , Will Deacon , Borislav Petkov , Dave Hansen , Srinivas Pandruvada , Michael Ellerman , Krzysztof Kozlowski , Alim Akhtar , Thierry Reding , MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Jani Nikula , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Simona Vetter , Daniel Lezcano , Sascha Hauer , Shawn Guo , Eduardo Valentin , Keerthy Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev, Ben Horgan , zhenglifeng , Zhang Rui , Len Brown , Lukasz Luba , Pengutronix Kernel Team Subject: Re: [PATCH v3 12/12] PM: EM: Use scope-based cleanup helper Message-ID: <202509022308.CeaKUqJM-lkp@intel.com> Precedence: bulk X-Mailing-List: oe-kbuild@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250901085748.36795-13-zhangzihuan@kylinos.cn> Message-ID: <20250902155320.eHCRIogVYa6nQ8mwc5xWqwNKsNB2oJtMrH3ychlP3hY@z> Hi Zihuan, kernel test robot noticed the following build warnings: https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Zihuan-Zhang/arm64-topology-Use-scope-based-cleanup-helper/20250901-170106 base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next patch link: https://lore.kernel.org/r/20250901085748.36795-13-zhangzihuan%40kylinos.cn patch subject: [PATCH v3 12/12] PM: EM: Use scope-based cleanup helper config: powerpc64-randconfig-r071-20250902 (https://download.01.org/0day-ci/archive/20250902/202509022308.CeaKUqJM-lkp@intel.com/config) compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 2e122990391b2ba062e6308a12cfedf7206270ba) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202509022308.CeaKUqJM-lkp@intel.com/ smatch warnings: kernel/power/energy_model.c:454 em_cpufreq_update_efficiencies() error: uninitialized symbol 'policy'. vim +/policy +454 kernel/power/energy_model.c e7b1cc9a7ea6d7 Lukasz Luba 2024-02-08 450 static void e7b1cc9a7ea6d7 Lukasz Luba 2024-02-08 451 em_cpufreq_update_efficiencies(struct device *dev, struct em_perf_state *table) e458716a92b57f Vincent Donnefort 2021-09-08 452 { e458716a92b57f Vincent Donnefort 2021-09-08 453 struct em_perf_domain *pd = dev->em_pd; 3a096464b04b72 Zihuan Zhang 2025-09-01 @454 struct cpufreq_policy *policy __free(put_cpufreq_policy); policy needs to be set to NULL here. e458716a92b57f Vincent Donnefort 2021-09-08 455 int found = 0; 99907d6054f2d3 Lukasz Luba 2024-02-08 456 int i, cpu; e458716a92b57f Vincent Donnefort 2021-09-08 457 e7b1cc9a7ea6d7 Lukasz Luba 2024-02-08 458 if (!_is_cpu_device(dev)) e458716a92b57f Vincent Donnefort 2021-09-08 459 return; ^^^^^^ returning before an initialization is an uninitialized variable bug. e458716a92b57f Vincent Donnefort 2021-09-08 460 99907d6054f2d3 Lukasz Luba 2024-02-08 461 /* Try to get a CPU which is active and in this PD */ 99907d6054f2d3 Lukasz Luba 2024-02-08 462 cpu = cpumask_first_and(em_span_cpus(pd), cpu_active_mask); 99907d6054f2d3 Lukasz Luba 2024-02-08 463 if (cpu >= nr_cpu_ids) { 99907d6054f2d3 Lukasz Luba 2024-02-08 464 dev_warn(dev, "EM: No online CPU for CPUFreq policy\n"); 99907d6054f2d3 Lukasz Luba 2024-02-08 465 return; 99907d6054f2d3 Lukasz Luba 2024-02-08 466 } 99907d6054f2d3 Lukasz Luba 2024-02-08 467 99907d6054f2d3 Lukasz Luba 2024-02-08 468 policy = cpufreq_cpu_get(cpu); Or we could declare it here: struct cpufreq_policy *policy __free(put_cpufreq_policy) = cpufreq_cpu_get(cpu); e458716a92b57f Vincent Donnefort 2021-09-08 469 if (!policy) { 4274521fabee05 Lukasz Luba 2024-02-08 470 dev_warn(dev, "EM: Access to CPUFreq policy failed\n"); e458716a92b57f Vincent Donnefort 2021-09-08 471 return; e458716a92b57f Vincent Donnefort 2021-09-08 472 } e458716a92b57f Vincent Donnefort 2021-09-08 473 e458716a92b57f Vincent Donnefort 2021-09-08 474 for (i = 0; i < pd->nr_perf_states; i++) { e458716a92b57f Vincent Donnefort 2021-09-08 475 if (!(table[i].flags & EM_PERF_STATE_INEFFICIENT)) e458716a92b57f Vincent Donnefort 2021-09-08 476 continue; e458716a92b57f Vincent Donnefort 2021-09-08 477 e458716a92b57f Vincent Donnefort 2021-09-08 478 if (!cpufreq_table_set_inefficient(policy, table[i].frequency)) e458716a92b57f Vincent Donnefort 2021-09-08 479 found++; e458716a92b57f Vincent Donnefort 2021-09-08 480 } e458716a92b57f Vincent Donnefort 2021-09-08 481 e458716a92b57f Vincent Donnefort 2021-09-08 482 if (!found) e458716a92b57f Vincent Donnefort 2021-09-08 483 return; e458716a92b57f Vincent Donnefort 2021-09-08 484 e458716a92b57f Vincent Donnefort 2021-09-08 485 /* e458716a92b57f Vincent Donnefort 2021-09-08 486 * Efficiencies have been installed in CPUFreq, inefficient frequencies e458716a92b57f Vincent Donnefort 2021-09-08 487 * will be skipped. The EM can do the same. e458716a92b57f Vincent Donnefort 2021-09-08 488 */ e458716a92b57f Vincent Donnefort 2021-09-08 489 pd->flags |= EM_PERF_DOMAIN_SKIP_INEFFICIENCIES; e458716a92b57f Vincent Donnefort 2021-09-08 490 } -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki