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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202407060044.YQzDGVPu-lkp@intel.com>
Date: Sat, 6 Jul 2024 00:41:53 +0800
From: kernel test robot <lkp@...el.com>
To: Théo Lebrun <theo.lebrun@...tlin.com>,
	Michael Turquette <mturquette@...libre.com>,
	Stephen Boyd <sboyd@...nel.org>, Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>
Cc: oe-kbuild-all@...ts.linux.dev, linux-clk@...r.kernel.org,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
	Vladimir Kondratiev <vladimir.kondratiev@...ileye.com>,
	Grégory Clement <gregory.clement@...tlin.com>,
	Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
	Tawfik Bayouk <tawfik.bayouk@...ileye.com>,
	Théo Lebrun <theo.lebrun@...tlin.com>
Subject: Re: [PATCH v2 4/4] clk: eyeq: add driver

Hi Théo,

kernel test robot noticed the following build errors:

[auto build test ERROR on f2661062f16b2de5d7b6a5c42a9a5c96326b8454]

url:    https://github.com/intel-lab-lkp/linux/commits/Th-o-Lebrun/Revert-dt-bindings-clock-mobileye-eyeq5-clk-add-bindings/20240704-211515
base:   f2661062f16b2de5d7b6a5c42a9a5c96326b8454
patch link:    https://lore.kernel.org/r/20240703-mbly-clk-v2-4-fe8c6199a579%40bootlin.com
patch subject: [PATCH v2 4/4] clk: eyeq: add driver
config: s390-randconfig-r132-20240705 (https://download.01.org/0day-ci/archive/20240706/202407060044.YQzDGVPu-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20240706/202407060044.YQzDGVPu-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/202407060044.YQzDGVPu-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

   drivers/clk/clk-eyeq.c: In function 'eqc_init':
>> drivers/clk/clk-eyeq.c:679:62: warning: dereferencing 'void *' pointer
     679 |         early_data = of_match_node(eqc_early_match_table, np)->data;
         |                                                              ^~
>> drivers/clk/clk-eyeq.c:679:62: error: request for member 'data' in something not a structure or union
   drivers/clk/clk-eyeq.c: At top level:
>> drivers/clk/clk-eyeq.c:653:34: warning: 'eqc_early_match_table' defined but not used [-Wunused-const-variable=]
     653 | static const struct of_device_id eqc_early_match_table[] = {
         |                                  ^~~~~~~~~~~~~~~~~~~~~


vim +/data +679 drivers/clk/clk-eyeq.c

   652	
 > 653	static const struct of_device_id eqc_early_match_table[] = {
   654		{
   655			.compatible = "mobileye,eyeq5-olb",
   656			.data = &eqc_eyeq5_early_match_data,
   657		},
   658		{
   659			.compatible = "mobileye,eyeq6h-central-olb",
   660			.data = &eqc_eyeq6h_central_early_match_data,
   661		},
   662		{
   663			.compatible = "mobileye,eyeq6h-west-olb",
   664			.data = &eqc_eyeq6h_west_early_match_data,
   665		},
   666		{}
   667	};
   668	MODULE_DEVICE_TABLE(of, eqc_early_match_table);
   669	
   670	static void __init eqc_init(struct device_node *np)
   671	{
   672		const struct eqc_early_match_data *early_data;
   673		unsigned int nb_clks = 0;
   674		struct eqc_priv *priv;
   675		void __iomem *base;
   676		unsigned int i;
   677		int ret;
   678	
 > 679		early_data = of_match_node(eqc_early_match_table, np)->data;
   680	
   681		/* No reason to early init this clock provider. Delay until probe. */
   682		if (!early_data || early_data->early_pll_count == 0)
   683			return;
   684	
   685		priv = kzalloc(sizeof(*priv), GFP_KERNEL);
   686		if (!priv) {
   687			ret = -ENOMEM;
   688			goto err;
   689		}
   690	
   691		priv->np = np;
   692		priv->early_data = early_data;
   693	
   694		nb_clks = early_data->early_pll_count + early_data->nb_late_clks;
   695		priv->cells = kzalloc(struct_size(priv->cells, hws, nb_clks), GFP_KERNEL);
   696		if (!priv->cells) {
   697			ret = -ENOMEM;
   698			goto err;
   699		}
   700	
   701		priv->cells->num = nb_clks;
   702	
   703		/*
   704		 * Mark all clocks as deferred; some are registered here, the rest at
   705		 * platform device probe.
   706		 */
   707		for (i = 0; i < nb_clks; i++)
   708			priv->cells->hws[i] = ERR_PTR(-EPROBE_DEFER);
   709	
   710		/* Offsets (reg64) of early PLLs are relative to OLB block. */
   711		base = of_iomap(np, 0);
   712		if (!base) {
   713			ret = -ENODEV;
   714			goto err;
   715		}
   716	
   717		for (i = 0; i < early_data->early_pll_count; i++) {
   718			const struct eqc_pll *pll = &early_data->early_plls[i];
   719			unsigned long mult, div, acc;
   720			struct clk_hw *hw;
   721			u32 r0, r1;
   722			u64 val;
   723	
   724			val = readq(base + pll->reg64);
   725			r0 = val;
   726			r1 = val >> 32;
   727	
   728			ret = eqc_pll_parse_registers(r0, r1, &mult, &div, &acc);
   729			if (ret) {
   730				pr_err("failed parsing state of %s\n", pll->name);
   731				goto err;
   732			}
   733	
   734			hw = clk_hw_register_fixed_factor_with_accuracy_fwname(NULL,
   735					np, pll->name, "ref", 0, mult, div, acc);
   736			priv->cells->hws[pll->index] = hw;
   737			if (IS_ERR(hw)) {
   738				pr_err("failed registering %s: %pe\n", pll->name, hw);
   739				ret = PTR_ERR(hw);
   740				goto err;
   741			}
   742		}
   743	
   744		/* When providing a single clock, require no cell. */
   745		if (nb_clks == 1)
   746			ret = of_clk_add_hw_provider(np, of_clk_hw_simple_get, priv->cells->hws[0]);
   747		else
   748			ret = of_clk_add_hw_provider(np, of_clk_hw_onecell_get, priv->cells);
   749		if (ret) {
   750			pr_err("failed registering clk provider: %d\n", ret);
   751			goto err;
   752		}
   753	
   754		spin_lock(&eqc_list_slock);
   755		list_add_tail(&priv->list, &eqc_list);
   756		spin_unlock(&eqc_list_slock);
   757	
   758		return;
   759	
   760	err:
   761		/*
   762		 * We are doomed. The system will not be able to boot.
   763		 *
   764		 * Let's still try to be good citizens by freeing resources and print
   765		 * a last error message that might help debugging.
   766		 */
   767	
   768		if (priv && priv->cells) {
   769			of_clk_del_provider(np);
   770	
   771			for (i = 0; i < early_data->early_pll_count; i++) {
   772				const struct eqc_pll *pll = &early_data->early_plls[i];
   773				struct clk_hw *hw = priv->cells->hws[pll->index];
   774	
   775				if (!IS_ERR_OR_NULL(hw))
   776					clk_hw_unregister_fixed_factor(hw);
   777			}
   778	
   779			kfree(priv->cells);
   780		}
   781	
   782		kfree(priv);
   783	
   784		pr_err("failed clk init: %d\n", ret);
   785	}
   786	

-- 
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