Re: [Patch v2 2/2] ACPI: processor: reduce CPUFREQ thermal reduction pctg for Tegra241

Sumit Gupta
2023-09-19T11:27:39Z

> Hi Sumit,
>
> kernel test robot noticed the following build warnings:
>
> [auto build test WARNING on rafael-pm/linux-next]
> [also build test WARNING on linus/master v6.6-rc1 next-20230913]
> [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/Sumit-Gupta/ACPI-thermal-Add-Thermal-fast-Sampling-Period-_TFP-support/20230914-004929
> base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
> patch link: https://lore.kernel.org/r/20230913164659.9345-3-sumitg%40nvidia.com
> patch subject: [Patch v2 2/2] ACPI: processor: reduce CPUFREQ thermal reduction pctg for Tegra241
> config: i386-defconfig (https://download.01.org/0day-ci/archive/20230914/202309140915.2J9OzWIZ-lkp@intel.com/config)
> compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230914/202309140915.2J9OzWIZ-lkp@intel.com/reproduce)
>
> 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 <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202309140915.2J9OzWIZ-lkp@intel.com/
>
> All warnings (new ones prefixed by >>):
>
>>> drivers/acpi/processor_thermal.c:141:6: warning: no previous declaration for 'acpi_thermal_cpufreq_config_nvidia' [-Wmissing-declarations]
> void acpi_thermal_cpufreq_config_nvidia(void)
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>

Thank you for the report.
The below change fixes the warning for me.

-void acpi_thermal_cpufreq_config_nvidia(void)
+static void acpi_thermal_cpufreq_config_nvidia(void)

Hi Rafael,
If there is no other comment. Could you please add the change while
applying or you prefer me sending new version ?

Thank you,
Sumit Gupta

>
> vim +/acpi_thermal_cpufreq_config_nvidia +141 drivers/acpi/processor_thermal.c
>
> 140
> > 141 void acpi_thermal_cpufreq_config_nvidia(void)
> 142 {
> 143 #ifdef CONFIG_HAVE_ARM_SMCCC_DISCOVERY
> 144 s32 soc_id = arm_smccc_get_soc_id_version();
> 145
> 146 /* Check JEP106 code for NVIDIA Tegra241 chip (036b:0241) */
> 147 if ((soc_id < 0) || (soc_id != SMCCC_SOC_ID_T241))
> 148 return;
> 149
> 150 /* Reduce the CPUFREQ Thermal reduction percentage to 5% */
> 151 cpufreq_thermal_pctg = 5;
> 152
> 153 /*
> 154 * Derive the MAX_STEP from minimum throttle percentage so that the reduction
> 155 * percentage doesn't end up becoming negative. Also, cap the MAX_STEP so that
> 156 * the CPU performance doesn't become 0.
> 157 */
> 158 cpufreq_thermal_max_step = ((100 / cpufreq_thermal_pctg) - 1);
> 159 #endif
> 160 }
> 161
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki