public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Liang He <windhl@126.com>,
	krzysztof.kozlowski@linaro.org, thierry.reding@gmail.com,
	jonathanh@nvidia.com
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org, windhl@126.com,
	linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org
Subject: Re: [PATCH] memory/tegra: Add missing of_node_get() in tegra_emc_find_node_by_ram_code
Date: Wed, 22 Jun 2022 16:35:46 +0800	[thread overview]
Message-ID: <202206221602.odN70SHs-lkp@intel.com> (raw)
In-Reply-To: <20220622042824.4094625-1-windhl@126.com>

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@intel.com/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@intel.com>

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

  parent reply	other threads:[~2022-06-22  8:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-22  4:28 [PATCH] memory/tegra: Add missing of_node_get() in tegra_emc_find_node_by_ram_code Liang He
2022-06-22  6:50 ` Krzysztof Kozlowski
2022-06-22  6:56   ` Liang He
2022-06-22  8:35 ` kernel test robot [this message]
2022-06-22  8:41 ` Krzysztof Kozlowski
2022-06-22  8:49   ` Liang He
2022-06-22  9:08     ` Krzysztof Kozlowski
2022-06-22  9:09       ` Krzysztof Kozlowski
2022-06-22  9:20       ` Liang He

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202206221602.odN70SHs-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=jonathanh@nvidia.com \
    --cc=kbuild-all@lists.01.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=thierry.reding@gmail.com \
    --cc=windhl@126.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox