From: kernel test robot <lkp@intel.com>
To: Gatien Chevallier <gatien.chevallier@foss.st.com>,
Olivia Mackall <olivia@selenic.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Lionel Debieve <lionel.debieve@foss.st.com>,
marex@denx.de
Cc: oe-kbuild-all@lists.linux.dev, linux-crypto@vger.kernel.org,
devicetree@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Gatien Chevallier <gatien.chevallier@foss.st.com>
Subject: Re: [PATCH v2 2/4] hwrng: stm32 - implement support for STM32MP25x platforms
Date: Tue, 15 Oct 2024 14:46:41 +0800 [thread overview]
Message-ID: <202410151421.5UhVRFdF-lkp@intel.com> (raw)
In-Reply-To: <20241011-rng-mp25-v2-v2-2-76fd6170280c@foss.st.com>
Hi Gatien,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 1d227fcc72223cbdd34d0ce13541cbaab5e0d72f]
url: https://github.com/intel-lab-lkp/linux/commits/Gatien-Chevallier/dt-bindings-rng-add-st-stm32mp25-rng-support/20241011-234913
base: 1d227fcc72223cbdd34d0ce13541cbaab5e0d72f
patch link: https://lore.kernel.org/r/20241011-rng-mp25-v2-v2-2-76fd6170280c%40foss.st.com
patch subject: [PATCH v2 2/4] hwrng: stm32 - implement support for STM32MP25x platforms
config: nios2-randconfig-r053-20241015 (https://download.01.org/0day-ci/archive/20241015/202410151421.5UhVRFdF-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 14.1.0
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/202410151421.5UhVRFdF-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> drivers/char/hw_random/stm32-rng.c:585:6-12: inconsistent IS_ERR and PTR_ERR on line 586.
vim +585 drivers/char/hw_random/stm32-rng.c
530
531 static int stm32_rng_probe(struct platform_device *ofdev)
532 {
533 struct device *dev = &ofdev->dev;
534 struct device_node *np = ofdev->dev.of_node;
535 struct stm32_rng_private *priv;
536 struct resource *res;
537
538 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
539 if (!priv)
540 return -ENOMEM;
541
542 priv->base = devm_platform_get_and_ioremap_resource(ofdev, 0, &res);
543 if (IS_ERR(priv->base))
544 return PTR_ERR(priv->base);
545
546 priv->rst = devm_reset_control_get(&ofdev->dev, NULL);
547 if (!IS_ERR(priv->rst)) {
548 reset_control_assert(priv->rst);
549 udelay(2);
550 reset_control_deassert(priv->rst);
551 }
552
553 priv->ced = of_property_read_bool(np, "clock-error-detect");
554 priv->lock_conf = of_property_read_bool(np, "st,rng-lock-conf");
555 priv->dev = dev;
556
557 priv->data = of_device_get_match_data(dev);
558 if (!priv->data)
559 return -ENODEV;
560
561 dev_set_drvdata(dev, priv);
562
563 priv->rng.name = dev_driver_string(dev);
564 priv->rng.init = stm32_rng_init;
565 priv->rng.read = stm32_rng_read;
566 priv->rng.quality = 900;
567
568 if (!priv->data->nb_clock || priv->data->nb_clock > 2)
569 return -EINVAL;
570
571 priv->clk_bulk = devm_kzalloc(dev, priv->data->nb_clock * sizeof(*priv->clk_bulk),
572 GFP_KERNEL);
573 if (!priv->clk_bulk)
574 return -ENOMEM;
575
576 if (priv->data->nb_clock == 2) {
577 struct clk *clk;
578 struct clk *bus_clk;
579
580 clk = devm_clk_get(&ofdev->dev, "core");
581 if (IS_ERR(clk))
582 return PTR_ERR(clk);
583
584 bus_clk = devm_clk_get(&ofdev->dev, "bus");
> 585 if (IS_ERR(clk))
> 586 return PTR_ERR(bus_clk);
587
588 priv->clk_bulk[0].clk = clk;
589 priv->clk_bulk[0].id = "core";
590 priv->clk_bulk[1].clk = bus_clk;
591 priv->clk_bulk[1].id = "bus";
592 } else {
593 struct clk *clk;
594
595 clk = devm_clk_get(&ofdev->dev, NULL);
596 if (IS_ERR(clk))
597 return PTR_ERR(clk);
598
599 priv->clk_bulk[0].clk = clk;
600 priv->clk_bulk[0].id = "core";
601 }
602
603 pm_runtime_set_autosuspend_delay(dev, 100);
604 pm_runtime_use_autosuspend(dev);
605 pm_runtime_enable(dev);
606
607 return devm_hwrng_register(dev, &priv->rng);
608 }
609
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-10-15 6:47 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-11 15:41 [PATCH v2 0/4] Add support for stm32mp25x RNG Gatien Chevallier
2024-10-11 15:41 ` [PATCH v2 1/4] dt-bindings: rng: add st,stm32mp25-rng support Gatien Chevallier
2024-10-14 7:29 ` Krzysztof Kozlowski
2024-10-14 9:31 ` Gatien CHEVALLIER
2024-10-11 15:41 ` [PATCH v2 2/4] hwrng: stm32 - implement support for STM32MP25x platforms Gatien Chevallier
2024-10-11 16:17 ` Marek Vasut
2024-10-14 8:38 ` Gatien CHEVALLIER
2024-10-14 8:52 ` Marek Vasut
2024-10-14 12:36 ` Gatien CHEVALLIER
2024-10-14 18:55 ` Marek Vasut
2024-10-15 15:10 ` Gatien CHEVALLIER
2024-10-15 15:39 ` Marek Vasut
2024-10-16 7:54 ` Gatien CHEVALLIER
2024-10-15 6:46 ` kernel test robot [this message]
2024-10-11 15:41 ` [PATCH v2 3/4] hwrng: stm32 - update STM32MP15 RNG max clock frequency Gatien Chevallier
2024-10-11 16:17 ` Marek Vasut
2024-10-11 15:41 ` [PATCH v2 4/4] arm64: dts: st: add RNG node on stm32mp251 Gatien Chevallier
2024-10-11 16:17 ` Marek Vasut
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=202410151421.5UhVRFdF-lkp@intel.com \
--to=lkp@intel.com \
--cc=alexandre.torgue@foss.st.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gatien.chevallier@foss.st.com \
--cc=herbert@gondor.apana.org.au \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=lionel.debieve@foss.st.com \
--cc=marex@denx.de \
--cc=mcoquelin.stm32@gmail.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=olivia@selenic.com \
--cc=robh@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.