[rafael-pm:thermal-core-testing 15/19] drivers/thermal/thermal_trip.c:80: warning: expecting prototype for __thermal_zone_set_trips(). Prototype was for thermal_zone_set_trips() instead

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git thermal-core-testing
head:   6e0a68e98f310000edb1e4aa178257d4bc3509f8
commit: 60f7b1c6e1b5722b8ac2958ec6c57c5cec9ef9c7 [15/19] thermal: trip: Rename __thermal_zone_set_trips() to thermal_zone_set_trips()
config: riscv-defconfig (https://download.01.org/0day-ci/archive/20240607/202406070545.l4cZkyKT-lkp@xxxxxxxxx/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project d7d2d4f53fc79b4b58e8d8d08151b577c3699d4a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240607/202406070545.l4cZkyKT-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406070545.l4cZkyKT-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/thermal/thermal_trip.c:80: warning: expecting prototype for __thermal_zone_set_trips(). Prototype was for thermal_zone_set_trips() instead


vim +80 drivers/thermal/thermal_trip.c

5b8de18ee9027c Daniel Lezcano    2023-01-23   63  
5b8de18ee9027c Daniel Lezcano    2023-01-23   64  /**
5b8de18ee9027c Daniel Lezcano    2023-01-23   65   * __thermal_zone_set_trips - Computes the next trip points for the driver
5b8de18ee9027c Daniel Lezcano    2023-01-23   66   * @tz: a pointer to a thermal zone device structure
5b8de18ee9027c Daniel Lezcano    2023-01-23   67   *
5b8de18ee9027c Daniel Lezcano    2023-01-23   68   * The function computes the next temperature boundaries by browsing
5b8de18ee9027c Daniel Lezcano    2023-01-23   69   * the trip points. The result is the closer low and high trip points
5b8de18ee9027c Daniel Lezcano    2023-01-23   70   * to the current temperature. These values are passed to the backend
5b8de18ee9027c Daniel Lezcano    2023-01-23   71   * driver to let it set its own notification mechanism (usually an
5b8de18ee9027c Daniel Lezcano    2023-01-23   72   * interrupt).
5b8de18ee9027c Daniel Lezcano    2023-01-23   73   *
5b8de18ee9027c Daniel Lezcano    2023-01-23   74   * This function must be called with tz->lock held. Both tz and tz->ops
5b8de18ee9027c Daniel Lezcano    2023-01-23   75   * must be valid pointers.
5b8de18ee9027c Daniel Lezcano    2023-01-23   76   *
5b8de18ee9027c Daniel Lezcano    2023-01-23   77   * It does not return a value
5b8de18ee9027c Daniel Lezcano    2023-01-23   78   */
60f7b1c6e1b572 Rafael J. Wysocki 2024-05-28   79  void thermal_zone_set_trips(struct thermal_zone_device *tz)
5b8de18ee9027c Daniel Lezcano    2023-01-23  @80  {
daeeb032f42d06 Rafael J. Wysocki 2024-04-02   81  	const struct thermal_trip_desc *td;
5b8de18ee9027c Daniel Lezcano    2023-01-23   82  	int low = -INT_MAX, high = INT_MAX;
0c0c4740c9d266 Rafael J. Wysocki 2023-12-04   83  	int ret;
5b8de18ee9027c Daniel Lezcano    2023-01-23   84  
5b8de18ee9027c Daniel Lezcano    2023-01-23   85  	lockdep_assert_held(&tz->lock);
5b8de18ee9027c Daniel Lezcano    2023-01-23   86  
698a1eb1f75eb6 Rafael J. Wysocki 2024-02-22   87  	if (!tz->ops.set_trips)
5b8de18ee9027c Daniel Lezcano    2023-01-23   88  		return;
5b8de18ee9027c Daniel Lezcano    2023-01-23   89  
daeeb032f42d06 Rafael J. Wysocki 2024-04-02   90  	for_each_trip_desc(tz, td) {
daeeb032f42d06 Rafael J. Wysocki 2024-04-02   91  		const struct thermal_trip *trip = &td->trip;
5b8de18ee9027c Daniel Lezcano    2023-01-23   92  		int trip_low;
5b8de18ee9027c Daniel Lezcano    2023-01-23   93  
0c0c4740c9d266 Rafael J. Wysocki 2023-12-04   94  		trip_low = trip->temperature - trip->hysteresis;
5b8de18ee9027c Daniel Lezcano    2023-01-23   95  
f67cf45deedb11 Daniel Lezcano    2024-03-25   96  		if (trip_low < tz->temperature && trip_low > low)
5b8de18ee9027c Daniel Lezcano    2023-01-23   97  			low = trip_low;
5b8de18ee9027c Daniel Lezcano    2023-01-23   98  
0c0c4740c9d266 Rafael J. Wysocki 2023-12-04   99  		if (trip->temperature > tz->temperature &&
f67cf45deedb11 Daniel Lezcano    2024-03-25  100  		    trip->temperature < high)
0c0c4740c9d266 Rafael J. Wysocki 2023-12-04  101  			high = trip->temperature;
5b8de18ee9027c Daniel Lezcano    2023-01-23  102  	}
5b8de18ee9027c Daniel Lezcano    2023-01-23  103  
5b8de18ee9027c Daniel Lezcano    2023-01-23  104  	/* No need to change trip points */
5b8de18ee9027c Daniel Lezcano    2023-01-23  105  	if (tz->prev_low_trip == low && tz->prev_high_trip == high)
5b8de18ee9027c Daniel Lezcano    2023-01-23  106  		return;
5b8de18ee9027c Daniel Lezcano    2023-01-23  107  
5b8de18ee9027c Daniel Lezcano    2023-01-23  108  	tz->prev_low_trip = low;
5b8de18ee9027c Daniel Lezcano    2023-01-23  109  	tz->prev_high_trip = high;
5b8de18ee9027c Daniel Lezcano    2023-01-23  110  
5b8de18ee9027c Daniel Lezcano    2023-01-23  111  	dev_dbg(&tz->device,
5b8de18ee9027c Daniel Lezcano    2023-01-23  112  		"new temperature boundaries: %d < x < %d\n", low, high);
5b8de18ee9027c Daniel Lezcano    2023-01-23  113  
5b8de18ee9027c Daniel Lezcano    2023-01-23  114  	/*
5b8de18ee9027c Daniel Lezcano    2023-01-23  115  	 * Set a temperature window. When this window is left the driver
5b8de18ee9027c Daniel Lezcano    2023-01-23  116  	 * must inform the thermal core via thermal_zone_device_update.
5b8de18ee9027c Daniel Lezcano    2023-01-23  117  	 */
698a1eb1f75eb6 Rafael J. Wysocki 2024-02-22  118  	ret = tz->ops.set_trips(tz, low, high);
5b8de18ee9027c Daniel Lezcano    2023-01-23  119  	if (ret)
5b8de18ee9027c Daniel Lezcano    2023-01-23  120  		dev_err(&tz->device, "Failed to set trips: %d\n", ret);
5b8de18ee9027c Daniel Lezcano    2023-01-23  121  }
5b8de18ee9027c Daniel Lezcano    2023-01-23  122  

:::::: The code at line 80 was first introduced by commit
:::::: 5b8de18ee9027c647db4c1905f7fd0550d17d67a thermal/core: Move the thermal trip code to a dedicated file

:::::: TO: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>
:::::: CC: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>

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




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux