Hi Marek, I love your patch! Perhaps something to improve: [auto build test WARNING on shawnguo/for-next] [also build test WARNING on soc/for-next linus/master v6.1-rc6 next-20221125] [cannot apply to robh/for-next rafael-pm/thermal arm/for-next arm/fixes arm64/for-next/core clk/clk-next kvmarm/next rockchip/for-next xilinx-xlnx/master] [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/Marek-Vasut/dt-bindings-thermal-imx8mm-thermal-Document-optional-nvmem-cells/20221127-064933 base: https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git for-next patch link: https://lore.kernel.org/r/20221126224740.311625-5-marex%40denx.de patch subject: [PATCH 5/5] thermal/drivers/imx: Add support for loading calibration data from OCOTP config: m68k-allyesconfig compiler: m68k-linux-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/f6dcd96ffbcbc0e197a9f97a56b101cd5fa8e70a git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Marek-Vasut/dt-bindings-thermal-imx8mm-thermal-Document-optional-nvmem-cells/20221127-064933 git checkout f6dcd96ffbcbc0e197a9f97a56b101cd5fa8e70a # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash drivers/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/thermal/imx8mm_thermal.c: In function 'imx8mm_tmu_probe_set_calib_v2': drivers/thermal/imx8mm_thermal.c:214:9: error: implicit declaration of function 'kfree'; did you mean 'vfree'? [-Werror=implicit-function-declaration] 214 | kfree(buf); | ^~~~~ | vfree In file included from include/linux/device.h:15, from include/linux/node.h:18, from include/linux/cpu.h:17, from include/linux/of_device.h:5, from drivers/thermal/imx8mm_thermal.c:15: >> drivers/thermal/imx8mm_thermal.c:218:25: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Wformat=] 218 | "OCOTP nvmem cell length is %ld, must be 16.\n", len); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap' 110 | _p_func(dev, fmt, ##__VA_ARGS__); \ | ^~~ include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt' 144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~ drivers/thermal/imx8mm_thermal.c:217:17: note: in expansion of macro 'dev_err' 217 | dev_err(dev, | ^~~~~~~ drivers/thermal/imx8mm_thermal.c:218:55: note: format string is defined here 218 | "OCOTP nvmem cell length is %ld, must be 16.\n", len); | ~~^ | | | long int | %d cc1: some warnings being treated as errors vim +218 drivers/thermal/imx8mm_thermal.c 193 194 static int imx8mm_tmu_probe_set_calib_v2(struct platform_device *pdev, 195 struct imx8mm_tmu *tmu) 196 { 197 struct device *dev = &pdev->dev; 198 struct nvmem_cell *cell; 199 u32 trim[4] = { 0 }; 200 size_t len; 201 void *buf; 202 203 cell = nvmem_cell_get(dev, "calib"); 204 if (IS_ERR(cell)) 205 return PTR_ERR(cell); 206 207 buf = nvmem_cell_read(cell, &len); 208 nvmem_cell_put(cell); 209 210 if (IS_ERR(buf)) 211 return PTR_ERR(buf); 212 213 memcpy(trim, buf, min(len, sizeof(trim))); > 214 kfree(buf); 215 216 if (len != 16) { 217 dev_err(dev, > 218 "OCOTP nvmem cell length is %ld, must be 16.\n", len); 219 return -EINVAL; 220 } 221 222 /* Blank sample hardware */ 223 if (!trim[0] && !trim[1] && !trim[2] && !trim[3]) { 224 /* Use a default 25C binary codes */ 225 writel(FIELD_PREP(TCALIV_SNSR25C_MASK, 0x63c), 226 tmu->base + TCALIV(0)); 227 writel(FIELD_PREP(TCALIV_SNSR25C_MASK, 0x63c), 228 tmu->base + TCALIV(1)); 229 return 0; 230 } 231 232 writel(FIELD_PREP(TASR_BUF_VERF_SEL_MASK, 233 FIELD_GET(TRIM2_BUF_VERF_SEL_MASK, trim[0])) | 234 FIELD_PREP(TASR_BUF_SLOPE_MASK, 235 FIELD_GET(TRIM2_BUF_SLOP_SEL_MASK, trim[0])), 236 tmu->base + TASR); 237 238 writel(FIELD_PREP(TRIM_BJT_CUR_MASK, 239 FIELD_GET(TRIM2_BJT_CUR_MASK, trim[0])) | 240 FIELD_PREP(TRIM_BGR_MASK, FIELD_GET(TRIM2_BGR_MASK, trim[0])) | 241 FIELD_PREP(TRIM_VLSB_MASK, FIELD_GET(TRIM2_VLSB_MASK, trim[0])) | 242 TRIM_EN_CH, 243 tmu->base + TRIM); 244 245 writel(FIELD_PREP(TCALIV_SNSR25C_MASK, 246 FIELD_GET(TRIM3_TCA25_0_LSB_MASK, trim[1]) | 247 (FIELD_GET(TRIM4_TCA25_0_MSB_MASK, trim[2]) << 4)) | 248 FIELD_PREP(TCALIV_SNSR105C_MASK, 249 FIELD_GET(TRIM4_TCA105_0_MASK, trim[2])), 250 tmu->base + TCALIV(0)); 251 252 writel(FIELD_PREP(TCALIV_SNSR25C_MASK, 253 FIELD_GET(TRIM5_TCA25_1_MASK, trim[3])) | 254 FIELD_PREP(TCALIV_SNSR105C_MASK, 255 FIELD_GET(TRIM5_TCA105_1_MASK, trim[3])), 256 tmu->base + TCALIV(1)); 257 258 writel(FIELD_PREP(TCALIV_SNSR25C_MASK, 259 FIELD_GET(TRIM3_TCA40_0_MASK, trim[1])) | 260 FIELD_PREP(TCALIV_SNSR105C_MASK, 261 FIELD_GET(TRIM4_TCA40_1_MASK, trim[2])), 262 tmu->base + TCALIV(2)); 263 264 return 0; 265 } 266 -- 0-DAY CI Kernel Test Service https://01.org/lkp