devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Théo Lebrun" <theo.lebrun@bootlin.com>,
	"Michael Turquette" <mturquette@baylibre.com>,
	"Stephen Boyd" <sboyd@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev, linux-clk@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Vladimir Kondratiev" <vladimir.kondratiev@mobileye.com>,
	"Grégory Clement" <gregory.clement@bootlin.com>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	"Tawfik Bayouk" <tawfik.bayouk@mobileye.com>,
	"Théo Lebrun" <theo.lebrun@bootlin.com>
Subject: Re: [PATCH v2 4/4] clk: eyeq: add driver
Date: Sat, 6 Jul 2024 00:41:53 +0800	[thread overview]
Message-ID: <202407060044.YQzDGVPu-lkp@intel.com> (raw)
In-Reply-To: <20240703-mbly-clk-v2-4-fe8c6199a579@bootlin.com>

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

      parent reply	other threads:[~2024-07-05 16:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-03 13:46 [PATCH v2 0/4] Add Mobileye EyeQ clock support Théo Lebrun
2024-07-03 13:46 ` [PATCH v2 1/4] Revert "dt-bindings: clock: mobileye,eyeq5-clk: add bindings" Théo Lebrun
2024-07-03 13:46 ` [PATCH v2 2/4] dt-bindings: clock: add Mobileye EyeQ6L/EyeQ6H clock indexes Théo Lebrun
2024-07-03 13:46 ` [PATCH v2 3/4] clk: divider: Introduce CLK_DIVIDER_EVEN_INTEGERS flag Théo Lebrun
2024-07-03 13:46 ` [PATCH v2 4/4] clk: eyeq: add driver Théo Lebrun
2024-07-05  1:50   ` kernel test robot
2024-07-05 10:03     ` Théo Lebrun
2024-07-05 16:41   ` kernel test robot [this message]

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=202407060044.YQzDGVPu-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregory.clement@bootlin.com \
    --cc=krzk@kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=tawfik.bayouk@mobileye.com \
    --cc=theo.lebrun@bootlin.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=vladimir.kondratiev@mobileye.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;
as well as URLs for NNTP newsgroup(s).