public inbox for linux-i3c@lists.infradead.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: carlos.song@nxp.com, miquel.raynal@bootlin.com, Frank.Li@nxp.com,
	alexandre.belloni@bootlin.com, robh@kernel.org,
	krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org,
	s.hauer@pengutronix.de, kernel@pengutronix.de,
	festevam@gmail.com, conor.culhane@silvaco.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-i3c@lists.infradead.org, imx@lists.linux.dev,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/3] i3c: master: svc: switch to bulk clk API for flexible clock support
Date: Mon, 21 Apr 2025 16:20:44 +0800	[thread overview]
Message-ID: <202504211643.FJsMtmVl-lkp@intel.com> (raw)
In-Reply-To: <20250421061544.2471379-3-carlos.song@nxp.com>

Hi,

kernel test robot noticed the following build warnings:

[auto build test WARNING on robh/for-next]
[also build test WARNING on linus/master v6.15-rc3 next-20250417]
[cannot apply to shawnguo/for-next]
[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/carlos-song-nxp-com/dt-bindings-i3c-silvaco-i3c-master-add-i-MX94-and-i-MX95-I3C/20250421-140716
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
patch link:    https://lore.kernel.org/r/20250421061544.2471379-3-carlos.song%40nxp.com
patch subject: [PATCH 2/3] i3c: master: svc: switch to bulk clk API for flexible clock support
config: arm-randconfig-001-20250421 (https://download.01.org/0day-ci/archive/20250421/202504211643.FJsMtmVl-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project f819f46284f2a79790038e1f6649172789734ae8)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250421/202504211643.FJsMtmVl-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/202504211643.FJsMtmVl-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/i3c/master/svc-i3c-master.c:1898:29: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
    1898 |                 return dev_err_probe(dev, ret, "can't get I3C clocks\n");
         |                                           ^~~
   drivers/i3c/master/svc-i3c-master.c:1882:9: note: initialize the variable 'ret' to silence this warning
    1882 |         int ret, i;
         |                ^
         |                 = 0
   1 warning generated.


vim +/ret +1898 drivers/i3c/master/svc-i3c-master.c

  1877	
  1878	static int svc_i3c_master_probe(struct platform_device *pdev)
  1879	{
  1880		struct device *dev = &pdev->dev;
  1881		struct svc_i3c_master *master;
  1882		int ret, i;
  1883	
  1884		master = devm_kzalloc(dev, sizeof(*master), GFP_KERNEL);
  1885		if (!master)
  1886			return -ENOMEM;
  1887	
  1888		master->drvdata = of_device_get_match_data(dev);
  1889		if (!master->drvdata)
  1890			return -EINVAL;
  1891	
  1892		master->regs = devm_platform_ioremap_resource(pdev, 0);
  1893		if (IS_ERR(master->regs))
  1894			return PTR_ERR(master->regs);
  1895	
  1896		master->num_clks = devm_clk_bulk_get_all(dev, &master->clks);
  1897		if (master->num_clks < 0)
> 1898			return dev_err_probe(dev, ret, "can't get I3C clocks\n");
  1899	
  1900		for (i = 0; i < master->num_clks; i++) {
  1901			if (!strcmp(master->clks[i].id, "fast_clk"))
  1902				break;
  1903		}
  1904	
  1905		if (i == master->num_clks)
  1906			return dev_err_probe(dev, -EINVAL,
  1907					     "can't get I3C peripheral clock\n");
  1908	
  1909		master->fclk = devm_clk_get(dev, "fast_clk");
  1910		if (IS_ERR(master->fclk))
  1911			return PTR_ERR(master->fclk);
  1912	
  1913		master->irq = platform_get_irq(pdev, 0);
  1914		if (master->irq < 0)
  1915			return master->irq;
  1916	
  1917		master->dev = dev;
  1918		ret = clk_bulk_prepare_enable(master->num_clks, master->clks);
  1919		if (ret)
  1920			return dev_err_probe(dev, ret, "can't enable I3C clocks\n");
  1921	
  1922		INIT_WORK(&master->hj_work, svc_i3c_master_hj_work);
  1923		INIT_WORK(&master->ibi_work, svc_i3c_master_ibi_work);
  1924		mutex_init(&master->lock);
  1925	
  1926		ret = devm_request_irq(dev, master->irq, svc_i3c_master_irq_handler,
  1927				       IRQF_NO_SUSPEND, "svc-i3c-irq", master);
  1928		if (ret)
  1929			goto err_disable_clks;
  1930	
  1931		master->free_slots = GENMASK(SVC_I3C_MAX_DEVS - 1, 0);
  1932	
  1933		spin_lock_init(&master->xferqueue.lock);
  1934		INIT_LIST_HEAD(&master->xferqueue.list);
  1935	
  1936		spin_lock_init(&master->ibi.lock);
  1937		master->ibi.num_slots = SVC_I3C_MAX_DEVS;
  1938		master->ibi.slots = devm_kcalloc(&pdev->dev, master->ibi.num_slots,
  1939						 sizeof(*master->ibi.slots),
  1940						 GFP_KERNEL);
  1941		if (!master->ibi.slots) {
  1942			ret = -ENOMEM;
  1943			goto err_disable_clks;
  1944		}
  1945	
  1946		platform_set_drvdata(pdev, master);
  1947	
  1948		pm_runtime_set_autosuspend_delay(&pdev->dev, SVC_I3C_PM_TIMEOUT_MS);
  1949		pm_runtime_use_autosuspend(&pdev->dev);
  1950		pm_runtime_get_noresume(&pdev->dev);
  1951		pm_runtime_set_active(&pdev->dev);
  1952		pm_runtime_enable(&pdev->dev);
  1953	
  1954		svc_i3c_master_reset(master);
  1955	
  1956		/* Register the master */
  1957		ret = i3c_master_register(&master->base, &pdev->dev,
  1958					  &svc_i3c_master_ops, false);
  1959		if (ret)
  1960			goto rpm_disable;
  1961	
  1962		pm_runtime_mark_last_busy(&pdev->dev);
  1963		pm_runtime_put_autosuspend(&pdev->dev);
  1964	
  1965		return 0;
  1966	
  1967	rpm_disable:
  1968		pm_runtime_dont_use_autosuspend(&pdev->dev);
  1969		pm_runtime_put_noidle(&pdev->dev);
  1970		pm_runtime_disable(&pdev->dev);
  1971		pm_runtime_set_suspended(&pdev->dev);
  1972	
  1973	err_disable_clks:
  1974		clk_bulk_disable_unprepare(master->num_clks, master->clks);
  1975	
  1976		return ret;
  1977	}
  1978	

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

-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

  reply	other threads:[~2025-04-21  8:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-21  6:15 [PATCH 0/3] support different numbers of clocks for svc i3c controller carlos.song
2025-04-21  6:15 ` [PATCH 1/3] dt-bindings: i3c: silvaco,i3c-master: add i.MX94 and i.MX95 I3C carlos.song
2025-04-21  7:22   ` Alexandre Belloni
2025-04-21 10:38     ` Carlos Song
2025-04-21  7:29   ` Rob Herring (Arm)
2025-04-21  6:15 ` [PATCH 2/3] i3c: master: svc: switch to bulk clk API for flexible clock support carlos.song
2025-04-21  8:20   ` kernel test robot [this message]
2025-04-21  6:15 ` [PATCH 3/3] arm64: dts: imx95: correct i3c node in imx95 carlos.song

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=202504211643.FJsMtmVl-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Frank.Li@nxp.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=carlos.song@nxp.com \
    --cc=conor+dt@kernel.org \
    --cc=conor.culhane@silvaco.com \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i3c@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=miquel.raynal@bootlin.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /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