[rafael-pm:bleeding-edge 74/77] drivers/thermal/thermal_of.c:444:34: error: initializing 'struct thermal_zone_device_ops *' with an expression of incompatible type 'struct thermal_zone_device_ops'; take the address with &

[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 bleeding-edge
head:   976b96a64c53e1e3d0fa71c97be2bcbe1a64feb1
commit: c483d4c88bfcd98d7819a722f48edb0adb89c32f [74/77] thermal: core: Store zone ops in struct thermal_zone_device
config: arm-defconfig (https://download.01.org/0day-ci/archive/20240209/202402091355.DUYRncj7-lkp@xxxxxxxxx/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project.git f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240209/202402091355.DUYRncj7-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/202402091355.DUYRncj7-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

>> drivers/thermal/thermal_of.c:444:34: error: initializing 'struct thermal_zone_device_ops *' with an expression of incompatible type 'struct thermal_zone_device_ops'; take the address with &
           struct thermal_zone_device_ops *ops = tz->ops;
                                           ^     ~~~~~~~
                                                 &
   1 error generated.


vim +444 drivers/thermal/thermal_of.c

3fd6d6e2b4e80f Daniel Lezcano 2022-08-05  432  
3fd6d6e2b4e80f Daniel Lezcano 2022-08-05  433  /**
3fd6d6e2b4e80f Daniel Lezcano 2022-08-05  434   * thermal_of_zone_unregister - Cleanup the specific allocated ressources
3fd6d6e2b4e80f Daniel Lezcano 2022-08-05  435   *
3fd6d6e2b4e80f Daniel Lezcano 2022-08-05  436   * This function disables the thermal zone and frees the different
3fd6d6e2b4e80f Daniel Lezcano 2022-08-05  437   * ressources allocated specific to the thermal OF.
3fd6d6e2b4e80f Daniel Lezcano 2022-08-05  438   *
3fd6d6e2b4e80f Daniel Lezcano 2022-08-05  439   * @tz: a pointer to the thermal zone structure
3fd6d6e2b4e80f Daniel Lezcano 2022-08-05  440   */
ac614a9b4c35bf Daniel Lezcano 2023-04-04  441  static void thermal_of_zone_unregister(struct thermal_zone_device *tz)
3fd6d6e2b4e80f Daniel Lezcano 2022-08-05  442  {
8fb5b71ed37dbe Daniel Lezcano 2022-08-09  443  	struct thermal_trip *trips = tz->trips;
8fb5b71ed37dbe Daniel Lezcano 2022-08-09 @444  	struct thermal_zone_device_ops *ops = tz->ops;
8fb5b71ed37dbe Daniel Lezcano 2022-08-09  445  
3fd6d6e2b4e80f Daniel Lezcano 2022-08-05  446  	thermal_zone_device_disable(tz);
3fd6d6e2b4e80f Daniel Lezcano 2022-08-05  447  	thermal_zone_device_unregister(tz);
8fb5b71ed37dbe Daniel Lezcano 2022-08-09  448  	kfree(trips);
8fb5b71ed37dbe Daniel Lezcano 2022-08-09  449  	kfree(ops);
3fd6d6e2b4e80f Daniel Lezcano 2022-08-05  450  }
3fd6d6e2b4e80f Daniel Lezcano 2022-08-05  451  

:::::: The code at line 444 was first introduced by commit
:::::: 8fb5b71ed37dbe469eaa930e2ddc93ec9e305f3c thermal/of: Fix free after use in thermal_of_unregister()

:::::: TO: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>
:::::: CC: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>

-- 
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