lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202601152233.og6LdeUo-lkp@intel.com>
Date: Thu, 15 Jan 2026 22:56:08 +0800
From: kernel test robot <lkp@...el.com>
To: Bartosz Golaszewski <bartosz.golaszewski@....qualcomm.com>,
	Rob Herring <robh@...nel.org>,
	Saravana Kannan <saravanak@...nel.org>
Cc: oe-kbuild-all@...ts.linux.dev, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Bartosz Golaszewski <bartosz.golaszewski@....qualcomm.com>
Subject: Re: [PATCH] of: guard pointers to key OF nodes with an #ifdef

Hi Bartosz,

kernel test robot noticed the following build errors:

[auto build test ERROR on robh/for-next]
[also build test ERROR on linus/master v6.19-rc5 next-20260115]
[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/Bartosz-Golaszewski/of-guard-pointers-to-key-OF-nodes-with-an-ifdef/20260115-171949
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
patch link:    https://lore.kernel.org/r/20260115091839.8206-1-bartosz.golaszewski%40oss.qualcomm.com
patch subject: [PATCH] of: guard pointers to key OF nodes with an #ifdef
config: sh-randconfig-r072-20260115 (https://download.01.org/0day-ci/archive/20260115/202601152233.og6LdeUo-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 14.3.0
smatch version: v0.5.0-8985-g2614ff1a
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260115/202601152233.og6LdeUo-lkp@intel.com/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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202601152233.og6LdeUo-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/clocksource/timer-integrator-ap.c: In function 'integrator_ap_timer_init_of':
>> drivers/clocksource/timer-integrator-ap.c:181:39: error: 'of_aliases' undeclared (first use in this function)
     181 |         err = of_property_read_string(of_aliases,
         |                                       ^~~~~~~~~~
   drivers/clocksource/timer-integrator-ap.c:181:39: note: each undeclared identifier is reported only once for each function it appears in
--
   drivers/soc/imx/soc-imx8m.c: In function 'imx8m_soc_probe':
>> drivers/soc/imx/soc-imx8m.c:243:39: error: 'of_root' undeclared (first use in this function); did you mean 'ma_root'?
     243 |         ret = of_property_read_string(of_root, "model", &soc_dev_attr->machine);
         |                                       ^~~~~~~
         |                                       ma_root
   drivers/soc/imx/soc-imx8m.c:243:39: note: each undeclared identifier is reported only once for each function it appears in
--
   drivers/soc/imx/soc-imx9.c: In function 'imx9_soc_probe':
>> drivers/soc/imx/soc-imx9.c:32:39: error: 'of_root' undeclared (first use in this function); did you mean 'ma_root'?
      32 |         err = of_property_read_string(of_root, "model", &attr->machine);
         |                                       ^~~~~~~
         |                                       ma_root
   drivers/soc/imx/soc-imx9.c:32:39: note: each undeclared identifier is reported only once for each function it appears in


vim +/of_aliases +181 drivers/clocksource/timer-integrator-ap.c

beb5818bd01295 Linus Walleij  2014-10-15  157  
76804d052316d3 Daniel Lezcano 2016-06-06  158  static int __init integrator_ap_timer_init_of(struct device_node *node)
beb5818bd01295 Linus Walleij  2014-10-15  159  {
beb5818bd01295 Linus Walleij  2014-10-15  160  	const char *path;
beb5818bd01295 Linus Walleij  2014-10-15  161  	void __iomem *base;
beb5818bd01295 Linus Walleij  2014-10-15  162  	int err;
beb5818bd01295 Linus Walleij  2014-10-15  163  	int irq;
beb5818bd01295 Linus Walleij  2014-10-15  164  	struct clk *clk;
beb5818bd01295 Linus Walleij  2014-10-15  165  	unsigned long rate;
5eb73c83117111 Yangtao Li     2018-11-25  166  	struct device_node *alias_node;
beb5818bd01295 Linus Walleij  2014-10-15  167  
beb5818bd01295 Linus Walleij  2014-10-15  168  	base = of_io_request_and_map(node, 0, "integrator-timer");
bd580e7ed4add8 Maxime Ripard  2015-05-02  169  	if (IS_ERR(base))
76804d052316d3 Daniel Lezcano 2016-06-06  170  		return PTR_ERR(base);
beb5818bd01295 Linus Walleij  2014-10-15  171  
beb5818bd01295 Linus Walleij  2014-10-15  172  	clk = of_clk_get(node, 0);
beb5818bd01295 Linus Walleij  2014-10-15  173  	if (IS_ERR(clk)) {
2a4849d2674b96 Rob Herring    2018-08-27  174  		pr_err("No clock for %pOFn\n", node);
76804d052316d3 Daniel Lezcano 2016-06-06  175  		return PTR_ERR(clk);
beb5818bd01295 Linus Walleij  2014-10-15  176  	}
beb5818bd01295 Linus Walleij  2014-10-15  177  	clk_prepare_enable(clk);
beb5818bd01295 Linus Walleij  2014-10-15  178  	rate = clk_get_rate(clk);
beb5818bd01295 Linus Walleij  2014-10-15  179  	writel(0, base + TIMER_CTRL);
beb5818bd01295 Linus Walleij  2014-10-15  180  
beb5818bd01295 Linus Walleij  2014-10-15 @181  	err = of_property_read_string(of_aliases,
beb5818bd01295 Linus Walleij  2014-10-15  182  				"arm,timer-primary", &path);
76804d052316d3 Daniel Lezcano 2016-06-06  183  	if (err) {
ac9ce6d1a0cc29 Rafał Miłecki  2017-03-09  184  		pr_warn("Failed to read property\n");
76804d052316d3 Daniel Lezcano 2016-06-06  185  		return err;
76804d052316d3 Daniel Lezcano 2016-06-06  186  	}
76804d052316d3 Daniel Lezcano 2016-06-06  187  
5eb73c83117111 Yangtao Li     2018-11-25  188  	alias_node = of_find_node_by_path(path);
5eb73c83117111 Yangtao Li     2018-11-25  189  
5eb73c83117111 Yangtao Li     2018-11-25  190  	/*
5eb73c83117111 Yangtao Li     2018-11-25  191  	 * The pointer is used as an identifier not as a pointer, we
5eb73c83117111 Yangtao Li     2018-11-25  192  	 * can drop the refcount on the of__node immediately after
5eb73c83117111 Yangtao Li     2018-11-25  193  	 * getting it.
5eb73c83117111 Yangtao Li     2018-11-25  194  	 */
5eb73c83117111 Yangtao Li     2018-11-25  195  	of_node_put(alias_node);
5eb73c83117111 Yangtao Li     2018-11-25  196  
5eb73c83117111 Yangtao Li     2018-11-25  197  	if (node == alias_node)
5eb73c83117111 Yangtao Li     2018-11-25  198  		/* The primary timer lacks IRQ, use as clocksource */
5eb73c83117111 Yangtao Li     2018-11-25  199  		return integrator_clocksource_init(rate, base);
76804d052316d3 Daniel Lezcano 2016-06-06  200  
beb5818bd01295 Linus Walleij  2014-10-15  201  	err = of_property_read_string(of_aliases,
beb5818bd01295 Linus Walleij  2014-10-15  202  				"arm,timer-secondary", &path);
76804d052316d3 Daniel Lezcano 2016-06-06  203  	if (err) {
ac9ce6d1a0cc29 Rafał Miłecki  2017-03-09  204  		pr_warn("Failed to read property\n");
76804d052316d3 Daniel Lezcano 2016-06-06  205  		return err;
76804d052316d3 Daniel Lezcano 2016-06-06  206  	}
76804d052316d3 Daniel Lezcano 2016-06-06  207  
5eb73c83117111 Yangtao Li     2018-11-25  208  	alias_node = of_find_node_by_path(path);
76804d052316d3 Daniel Lezcano 2016-06-06  209  
5eb73c83117111 Yangtao Li     2018-11-25  210  	of_node_put(alias_node);
beb5818bd01295 Linus Walleij  2014-10-15  211  
5eb73c83117111 Yangtao Li     2018-11-25  212  	if (node == alias_node) {
beb5818bd01295 Linus Walleij  2014-10-15  213  		/* The secondary timer will drive the clock event */
beb5818bd01295 Linus Walleij  2014-10-15  214  		irq = irq_of_parse_and_map(node, 0);
76804d052316d3 Daniel Lezcano 2016-06-06  215  		return integrator_clockevent_init(rate, base, irq);
beb5818bd01295 Linus Walleij  2014-10-15  216  	}
beb5818bd01295 Linus Walleij  2014-10-15  217  
beb5818bd01295 Linus Walleij  2014-10-15  218  	pr_info("Timer @%p unused\n", base);
beb5818bd01295 Linus Walleij  2014-10-15  219  	clk_disable_unprepare(clk);
76804d052316d3 Daniel Lezcano 2016-06-06  220  
76804d052316d3 Daniel Lezcano 2016-06-06  221  	return 0;
beb5818bd01295 Linus Walleij  2014-10-15  222  }
beb5818bd01295 Linus Walleij  2014-10-15  223  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ