Hi Liang, Thank you for the patch! Yet something to improve: [auto build test ERROR on tegra/for-next] [also build test ERROR on tegra-drm/drm/tegra/for-next linus/master v5.19-rc3 next-20220621] [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/intel-lab-lkp/linux/commits/Liang-He/memory-tegra-Add-missing-of_node_get-in-tegra_emc_find_node_by_ram_code/20220622-123052 base: https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git for-next config: hexagon-randconfig-r041-20220622 (https://download.01.org/0day-ci/archive/20220622/202206221602.odN70SHs-lkp@xxxxxxxxx/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 8b8d126598ce7bd5243da7f94f69fa1104288bee) 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/6f5dd7a2fb5c7d45a25cdf4409c5aa03c4df0a96 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Liang-He/memory-tegra-Add-missing-of_node_get-in-tegra_emc_find_node_by_ram_code/20220622-123052 git checkout 6f5dd7a2fb5c7d45a25cdf4409c5aa03c4df0a96 # 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=hexagon SHELL=/bin/bash drivers/memory/tegra/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot <lkp@xxxxxxxxx> All errors (new ones prefixed by >>): >> drivers/memory/tegra/tegra20-emc.c:480:2: error: call to undeclared function 'of_get_node'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] of_get_node(dev->of_node); ^ 1 error generated. vim +/of_get_node +480 drivers/memory/tegra/tegra20-emc.c 456 457 static struct device_node * 458 tegra_emc_find_node_by_ram_code(struct tegra_emc *emc) 459 { 460 struct device *dev = emc->dev; 461 struct device_node *np; 462 u32 value, ram_code; 463 int err; 464 465 if (emc->mrr_error) { 466 dev_warn(dev, "memory timings skipped due to MRR error\n"); 467 return NULL; 468 } 469 470 if (of_get_child_count(dev->of_node) == 0) { 471 dev_info_once(dev, "device-tree doesn't have memory timings\n"); 472 return NULL; 473 } 474 475 if (!of_property_read_bool(dev->of_node, "nvidia,use-ram-code")) 476 return of_node_get(dev->of_node); 477 478 ram_code = tegra_read_ram_code(); 479 > 480 of_get_node(dev->of_node); 481 for (np = of_find_node_by_name(dev->of_node, "emc-tables"); np; 482 np = of_find_node_by_name(np, "emc-tables")) { 483 err = of_property_read_u32(np, "nvidia,ram-code", &value); 484 if (err || value != ram_code) { 485 struct device_node *lpddr2_np; 486 bool cfg_mismatches = false; 487 488 of_node_get(np); 489 lpddr2_np = of_find_node_by_name(np, "lpddr2"); 490 if (lpddr2_np) { 491 const struct lpddr2_info *info; 492 493 info = of_lpddr2_get_info(lpddr2_np, dev); 494 if (info) { 495 if (info->manufacturer_id >= 0 && 496 info->manufacturer_id != emc->manufacturer_id) 497 cfg_mismatches = true; 498 499 if (info->revision_id1 >= 0 && 500 info->revision_id1 != emc->revision_id1) 501 cfg_mismatches = true; 502 503 if (info->revision_id2 >= 0 && 504 info->revision_id2 != emc->revision_id2) 505 cfg_mismatches = true; 506 507 if (info->density != emc->basic_conf4.density) 508 cfg_mismatches = true; 509 510 if (info->io_width != emc->basic_conf4.io_width) 511 cfg_mismatches = true; 512 513 if (info->arch_type != emc->basic_conf4.arch_type) 514 cfg_mismatches = true; 515 } else { 516 dev_err(dev, "failed to parse %pOF\n", lpddr2_np); 517 cfg_mismatches = true; 518 } 519 520 of_node_put(lpddr2_np); 521 } else { 522 cfg_mismatches = true; 523 } 524 525 if (cfg_mismatches) { 526 continue; 527 } 528 } 529 530 return np; 531 } 532 533 dev_err(dev, "no memory timings for RAM code %u found in device tree\n", 534 ram_code); 535 536 return NULL; 537 } 538 -- 0-DAY CI Kernel Test Service https://01.org/lkp