All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Daniel Lezcano <daniel.lezcano@linaro.org>, rjw@rjwysocki.net
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	daniel.lezcano@linaro.org, linux-acpi@vger.kernel.org,
	linux-pm@vger.kernel.org,
	Daniel Lezcano <daniel.lezcano@kernel.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Zhang Rui <rui.zhang@intel.com>, Len Brown <lenb@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 11/11] thermal/acpi: Use the thermal framework ACPI API
Date: Sat, 4 Feb 2023 15:54:42 +0800	[thread overview]
Message-ID: <202302041525.ZDaLecDd-lkp@intel.com> (raw)
In-Reply-To: <20230203174429.3375691-12-daniel.lezcano@linaro.org>

Hi Daniel,

I love your patch! Yet something to improve:

[auto build test ERROR on rafael-pm/linux-next]
[also build test ERROR on linus/master v6.2-rc6 next-20230203]
[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/Daniel-Lezcano/thermal-acpi-Remove-the-intermediate-acpi_thermal_trip-structure/20230204-015126
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
patch link:    https://lore.kernel.org/r/20230203174429.3375691-12-daniel.lezcano%40linaro.org
patch subject: [PATCH v2 11/11] thermal/acpi: Use the thermal framework ACPI API
config: i386-randconfig-a002 (https://download.01.org/0day-ci/archive/20230204/202302041525.ZDaLecDd-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/2c921da06a8ac8f9e047f1a683146e1c5561534a
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Daniel-Lezcano/thermal-acpi-Remove-the-intermediate-acpi_thermal_trip-structure/20230204-015126
        git checkout 2c921da06a8ac8f9e047f1a683146e1c5561534a
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/acpi/thermal.c:274:8: error: implicit declaration of function 'thermal_acpi_critical_trip_temp' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           ret = thermal_acpi_critical_trip_temp(tz->device->handle, &trip.temperature);
                 ^
>> drivers/acpi/thermal.c:307:8: error: implicit declaration of function 'thermal_acpi_hot_trip_temp' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           ret = thermal_acpi_hot_trip_temp(tz->device->handle, &trip.temperature);
                 ^
   drivers/acpi/thermal.c:307:8: note: did you mean 'thermal_zone_get_crit_temp'?
   include/linux/thermal.h:347:5: note: 'thermal_zone_get_crit_temp' declared here
   int thermal_zone_get_crit_temp(struct thermal_zone_device *tz, int *temp);
       ^
>> drivers/acpi/thermal.c:339:8: error: implicit declaration of function 'thermal_acpi_passive_trip_temp' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           ret = thermal_acpi_passive_trip_temp(tz->device->handle, &trip.temperature);
                 ^
>> drivers/acpi/thermal.c:380:9: error: implicit declaration of function 'thermal_acpi_active_trip_temp' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                   ret = thermal_acpi_active_trip_temp(tz->device->handle, i , &trip.temperature);
                         ^
   4 errors generated.


vim +/thermal_acpi_critical_trip_temp +274 drivers/acpi/thermal.c

   257	
   258	static struct thermal_trip *acpi_thermal_trips_alloc_critical(struct acpi_thermal *tz,
   259								      struct thermal_trip *trips,
   260								      int *num_trips)
   261	{
   262		struct thermal_trip trip = {
   263			.type = THERMAL_TRIP_CRITICAL,
   264		};
   265	
   266		int ret;
   267	
   268		/*
   269		 * Module parameters disable the critical trip point
   270		 */
   271		if (crt < 0)
   272			goto out;
   273	
 > 274		ret = thermal_acpi_critical_trip_temp(tz->device->handle, &trip.temperature);
   275		if (ret)
   276			goto out;
   277		
   278		if (trip.temperature <= 0) {
   279			pr_info(FW_BUG "Invalid critical threshold (%d)\n", trip.temperature);
   280			goto out;
   281		}
   282	
   283		trips = krealloc(trips, sizeof(*trips) * (*num_trips + 1), GFP_KERNEL);
   284		if (!trips)
   285			goto out;
   286	
   287		trips[*num_trips] = trip; /* structure copy */
   288	
   289		if (crt > 0)
   290			acpi_thermal_trips_override(&trips[*num_trips], crt * MILLI);
   291		
   292		(*num_trips)++;
   293	out:
   294		return trips;
   295	}
   296	
   297	static struct thermal_trip *acpi_thermal_trips_alloc_hot(struct acpi_thermal *tz,
   298								 struct thermal_trip *trips,
   299								 int *num_trips)
   300	{
   301		struct thermal_trip trip = {
   302			.type = THERMAL_TRIP_HOT,
   303		};
   304	
   305		int ret;
   306	
 > 307		ret = thermal_acpi_hot_trip_temp(tz->device->handle, &trip.temperature);
   308		if (ret)
   309			goto out;
   310	
   311		trips = krealloc(trips, sizeof(*trips) * (*num_trips + 1), GFP_KERNEL);
   312		if (!trips)
   313			goto out;
   314	
   315		trips[*num_trips] = trip; /* structure copy */
   316		
   317		(*num_trips)++;
   318	out:
   319		return trips;
   320	}
   321	
   322	static struct thermal_trip *acpi_thermal_trips_alloc_passive(struct acpi_thermal *tz,
   323								     struct thermal_trip *trips,
   324								     int *num_trips)
   325	{
   326		acpi_status status;
   327		struct acpi_handle_list devices;
   328		struct thermal_trip trip = {
   329			.type = THERMAL_TRIP_PASSIVE
   330		};
   331		int ret;
   332	
   333		/*
   334		 * Module parameters disable all passive trip points
   335		 */
   336		if (psv < 0)
   337			goto out;
   338		
 > 339		ret = thermal_acpi_passive_trip_temp(tz->device->handle, &trip.temperature);
   340		if (ret)
   341			goto out;
   342		
   343		status = acpi_evaluate_reference(tz->device->handle, "_PSL", NULL, &devices);
   344		if (ACPI_FAILURE(status)) {
   345			acpi_handle_debug(tz->device->handle, "No passive device associated\n");
   346			goto out;
   347		}
   348	
   349		trips = krealloc(trips, sizeof(*trips) * (*num_trips + 1), GFP_KERNEL);
   350		if (!trips)
   351			goto out;
   352	
   353		trips[*num_trips] = trip; /* structure copy */	
   354		
   355		(*num_trips)++;
   356	out:
   357		return trips;
   358	}
   359	
   360	static struct thermal_trip *acpi_thermal_trips_alloc_active(struct acpi_thermal *tz,
   361								    struct thermal_trip *trips,
   362								    int *num_trips)
   363	{
   364		acpi_status status;
   365		struct acpi_handle_list devices;
   366		int i, ret;
   367	
   368		/*
   369		 * Module parameters disable all active trip points
   370		 */
   371		if (act < 0)
   372			return trips;
   373	
   374		for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE; i++) {
   375			struct thermal_trip trip = {
   376				.type = THERMAL_TRIP_ACTIVE,
   377			};
   378			char name[5];
   379	
 > 380			ret = thermal_acpi_active_trip_temp(tz->device->handle, i , &trip.temperature);
   381			if (ret)
   382				break;
   383	
   384			sprintf(name, "_AL%d", i);
   385	
   386			status = acpi_evaluate_reference(tz->device->handle, name, NULL, &devices);
   387			if (ACPI_FAILURE(status)) {
   388				acpi_handle_info(tz->device->handle, "No _AL%d defined for _AC%d\n", i, i);
   389				break;
   390			}
   391			
   392			trips = krealloc(trips, sizeof(*trips) * (*num_trips + 1), GFP_KERNEL);
   393			if (!trips)
   394				break;
   395	
   396			trips[*num_trips] = trip; /* structure copy */	
   397	
   398			(*num_trips)++;
   399		}
   400	
   401		/*
   402		 * We found at least one trip point and we have an override option
   403		 */
   404		if (i && act) {
   405			/*
   406			 * Regarding the ACPI specification AC0 is the highest active
   407			 * temperature trip point. We will override this one.
   408			 */
   409			acpi_thermal_trips_override(&trips[*num_trips], act * MILLI);		
   410		}
   411	
   412		return trips;
   413	}
   414	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

  parent reply	other threads:[~2023-02-04  7:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-03 17:44 [PATCH v2 00/11] Generic trip points for ACPI Daniel Lezcano
2023-02-03 17:44 ` [PATCH v2 01/11] thermal/acpi: Remove the intermediate acpi_thermal_trip structure Daniel Lezcano
2023-02-03 17:44 ` [PATCH v2 02/11] thermal/acpi: Change to a common " Daniel Lezcano
2023-02-03 17:44 ` [PATCH v2 03/11] thermal/acpi: Convert the acpi thermal trips to an array Daniel Lezcano
2023-02-03 17:44 ` [PATCH v2 04/11] thermal/acpi: Move the active trip points to the same array Daniel Lezcano
2023-02-03 17:44 ` [PATCH v2 05/11] thermal/acpi: Optimize get_trip_points() Daniel Lezcano
2023-02-03 17:44 ` [PATCH v2 06/11] thermal/acpi: Encapsulate in functions the trip initialization Daniel Lezcano
2023-02-03 17:44 ` [PATCH v2 07/11] thermal/acpi: Simplifify the condition check Daniel Lezcano
2023-02-03 17:44 ` [PATCH v2 08/11] thermal/acpi: Remove active and enabled flags Daniel Lezcano
2023-02-03 17:44 ` [PATCH v2 09/11] thermal/acpi: Convert the units to milli Celsuis Daniel Lezcano
2023-02-03 17:44 ` [PATCH v2 10/11] thermal/acpi: Rewrite the trip point intialization to use the generic thermal trip Daniel Lezcano
2023-02-03 17:44 ` [PATCH v2 11/11] thermal/acpi: Use the thermal framework ACPI API Daniel Lezcano
2023-02-04  5:10   ` kernel test robot
2023-02-04  7:54   ` kernel test robot [this message]
2023-02-07  7:42   ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202302041525.ZDaLecDd-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=daniel.lezcano@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rafael@kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=rui.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.