[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202012030002.dYIZuGJB-lkp@intel.com>
Date: Thu, 3 Dec 2020 00:14:01 +0800
From: kernel test robot <lkp@...el.com>
To: Daniel Lezcano <daniel.lezcano@...aro.org>, rui.zhang@...el.com
Cc: kbuild-all@...ts.01.org, amitk@...nel.org,
linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org
Subject: Re: [PATCH 1/4] thermal/core: Rename passive_delay and polling_delay
with units
Hi Daniel,
I love your patch! Yet something to improve:
[auto build test ERROR on linux/master]
[also build test ERROR on linus/master v5.10-rc6 next-20201201]
[cannot apply to thermal/next]
[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]
url: https://github.com/0day-ci/linux/commits/Daniel-Lezcano/thermal-core-Rename-passive_delay-and-polling_delay-with-units/20201202-201150
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 09162bc32c880a791c6c0668ce0745cf7958f576
config: nios2-randconfig-r021-20201202 (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0
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/0day-ci/linux/commit/ade78f158731d79d859533d4370cc2a1294be32e
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Daniel-Lezcano/thermal-core-Rename-passive_delay-and-polling_delay-with-units/20201202-201150
git checkout ade78f158731d79d859533d4370cc2a1294be32e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
drivers/thermal/thermal_of.c: In function 'thermal_of_build_thermal_zone':
>> drivers/thermal/thermal_of.c:868:6: error: 'struct __thermal_zone' has no member named 'passive_delay_ms'; did you mean 'passive_delay'?
868 | tz->passive_delay_ms = prop;
| ^~~~~~~~~~~~~~~~
| passive_delay
>> drivers/thermal/thermal_of.c:875:6: error: 'struct __thermal_zone' has no member named 'polling_delay_ms'; did you mean 'polling_delay'?
875 | tz->polling_delay_ms = prop;
| ^~~~~~~~~~~~~~~~
| polling_delay
drivers/thermal/thermal_of.c: In function 'of_parse_thermal_zones':
drivers/thermal/thermal_of.c:1088:15: error: 'struct __thermal_zone' has no member named 'passive_delay_ms'; did you mean 'passive_delay'?
1088 | tz->passive_delay_ms,
| ^~~~~~~~~~~~~~~~
| passive_delay
drivers/thermal/thermal_of.c:1089:15: error: 'struct __thermal_zone' has no member named 'polling_delay_ms'; did you mean 'polling_delay'?
1089 | tz->polling_delay_ms);
| ^~~~~~~~~~~~~~~~
| polling_delay
--
drivers/thermal/da9062-thermal.c: In function 'da9062_thermal_poll_on':
>> drivers/thermal/da9062-thermal.c:98:43: error: 'struct thermal_zone_device' has no member named 'passive_delay'; did you mean 'passive_delay_ms'?
98 | delay = msecs_to_jiffies(thermal->zone->passive_delay);
| ^~~~~~~~~~~~~
| passive_delay_ms
In file included from include/linux/printk.h:409,
from include/linux/kernel.h:16,
from include/linux/interrupt.h:6,
from drivers/thermal/da9062-thermal.c:22:
drivers/thermal/da9062-thermal.c: In function 'da9062_thermal_probe':
drivers/thermal/da9062-thermal.c:248:18: error: 'struct thermal_zone_device' has no member named 'passive_delay'; did you mean 'passive_delay_ms'?
248 | thermal->zone->passive_delay);
| ^~~~~~~~~~~~~
include/linux/dynamic_debug.h:129:15: note: in definition of macro '__dynamic_func_call'
129 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:161:2: note: in expansion of macro '_dynamic_func_call'
161 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:2: note: in expansion of macro 'dynamic_dev_dbg'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
drivers/thermal/da9062-thermal.c:246:2: note: in expansion of macro 'dev_dbg'
246 | dev_dbg(&pdev->dev,
| ^~~~~~~
vim +868 drivers/thermal/thermal_of.c
831
832 /**
833 * thermal_of_build_thermal_zone - parse and fill one thermal zone data
834 * @np: DT node containing a thermal zone node
835 *
836 * This function parses a thermal zone type of node represented by
837 * @np parameter and fills the read data into a __thermal_zone data structure
838 * and return this pointer.
839 *
840 * TODO: Missing properties to parse: thermal-sensor-names
841 *
842 * Return: On success returns a valid struct __thermal_zone,
843 * otherwise, it returns a corresponding ERR_PTR(). Caller must
844 * check the return value with help of IS_ERR() helper.
845 */
846 static struct __thermal_zone
847 __init *thermal_of_build_thermal_zone(struct device_node *np)
848 {
849 struct device_node *child = NULL, *gchild;
850 struct __thermal_zone *tz;
851 int ret, i;
852 u32 prop, coef[2];
853
854 if (!np) {
855 pr_err("no thermal zone np\n");
856 return ERR_PTR(-EINVAL);
857 }
858
859 tz = kzalloc(sizeof(*tz), GFP_KERNEL);
860 if (!tz)
861 return ERR_PTR(-ENOMEM);
862
863 ret = of_property_read_u32(np, "polling-delay-passive", &prop);
864 if (ret < 0) {
865 pr_err("%pOFn: missing polling-delay-passive property\n", np);
866 goto free_tz;
867 }
> 868 tz->passive_delay_ms = prop;
869
870 ret = of_property_read_u32(np, "polling-delay", &prop);
871 if (ret < 0) {
872 pr_err("%pOFn: missing polling-delay property\n", np);
873 goto free_tz;
874 }
> 875 tz->polling_delay_ms = prop;
876
877 /*
878 * REVIST: for now, the thermal framework supports only
879 * one sensor per thermal zone. Thus, we are considering
880 * only the first two values as slope and offset.
881 */
882 ret = of_property_read_u32_array(np, "coefficients", coef, 2);
883 if (ret == 0) {
884 tz->slope = coef[0];
885 tz->offset = coef[1];
886 } else {
887 tz->slope = 1;
888 tz->offset = 0;
889 }
890
891 /* trips */
892 child = of_get_child_by_name(np, "trips");
893
894 /* No trips provided */
895 if (!child)
896 goto finish;
897
898 tz->ntrips = of_get_child_count(child);
899 if (tz->ntrips == 0) /* must have at least one child */
900 goto finish;
901
902 tz->trips = kcalloc(tz->ntrips, sizeof(*tz->trips), GFP_KERNEL);
903 if (!tz->trips) {
904 ret = -ENOMEM;
905 goto free_tz;
906 }
907
908 i = 0;
909 for_each_child_of_node(child, gchild) {
910 ret = thermal_of_populate_trip(gchild, &tz->trips[i++]);
911 if (ret)
912 goto free_trips;
913 }
914
915 of_node_put(child);
916
917 /* cooling-maps */
918 child = of_get_child_by_name(np, "cooling-maps");
919
920 /* cooling-maps not provided */
921 if (!child)
922 goto finish;
923
924 tz->num_tbps = of_get_child_count(child);
925 if (tz->num_tbps == 0)
926 goto finish;
927
928 tz->tbps = kcalloc(tz->num_tbps, sizeof(*tz->tbps), GFP_KERNEL);
929 if (!tz->tbps) {
930 ret = -ENOMEM;
931 goto free_trips;
932 }
933
934 i = 0;
935 for_each_child_of_node(child, gchild) {
936 ret = thermal_of_populate_bind_params(gchild, &tz->tbps[i++],
937 tz->trips, tz->ntrips);
938 if (ret)
939 goto free_tbps;
940 }
941
942 finish:
943 of_node_put(child);
944
945 return tz;
946
947 free_tbps:
948 for (i = i - 1; i >= 0; i--) {
949 struct __thermal_bind_params *tbp = tz->tbps + i;
950 int j;
951
952 for (j = 0; j < tbp->count; j++)
953 of_node_put(tbp->tcbp[j].cooling_device);
954
955 kfree(tbp->tcbp);
956 }
957
958 kfree(tz->tbps);
959 free_trips:
960 for (i = 0; i < tz->ntrips; i++)
961 of_node_put(tz->trips[i].np);
962 kfree(tz->trips);
963 of_node_put(gchild);
964 free_tz:
965 kfree(tz);
966 of_node_put(child);
967
968 return ERR_PTR(ret);
969 }
970
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (26488 bytes)
Powered by blists - more mailing lists