From: kernel test robot <lkp@intel.com>
To: Steen Hegelund <steen.hegelund@microchip.com>,
Kishon Vijay Abraham I <kishon@ti.com>,
Vinod Koul <vkoul@kernel.org>,
linux-arm-kernel@lists.infradead.org
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
Steen Hegelund <steen.hegelund@microchip.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Lars Povlsen <lars.povlsen@microchip.com>,
Bjarni Jonasson <bjarni.jonasson@microchip.com>,
Microchip UNG Driver List <UNGLinuxDriver@microchip.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 3/4] phy: Add Sparx5 ethernet serdes PHY driver
Date: Thu, 3 Dec 2020 05:24:17 +0800 [thread overview]
Message-ID: <202012030553.ttaoZe01-lkp@intel.com> (raw)
In-Reply-To: <20201202130438.3330228-4-steen.hegelund@microchip.com>
[-- Attachment #1: Type: text/plain, Size: 4216 bytes --]
Hi Steen,
I love your patch! Perhaps something to improve:
[auto build test WARNING on robh/for-next]
[also build test WARNING on linux/master linus/master v5.10-rc6 next-20201201]
[cannot apply to phy/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]
url: https://github.com/0day-ci/linux/commits/Steen-Hegelund/Adding-the-Sparx5-Serdes-driver/20201202-211116
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: riscv-randconfig-r016-20201202 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 2671fccf0381769276ca8246ec0499adcb9b0355)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/0day-ci/linux/commit/f9670130c2b0d7ccd38a459e66d8da36b8edb7e0
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Steen-Hegelund/Adding-the-Sparx5-Serdes-driver/20201202-211116
git checkout f9670130c2b0d7ccd38a459e66d8da36b8edb7e0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/phy/microchip/sparx5_serdes.c:2393:54: warning: variable 'idx' is uninitialized when used here [-Wuninitialized]
iores = platform_get_resource(pdev, IORESOURCE_MEM, idx);
^~~
drivers/phy/microchip/sparx5_serdes.c:2367:9: note: initialize the variable 'idx' to silence this warning
int idx;
^
= 0
1 warning generated.
vim +/idx +2393 drivers/phy/microchip/sparx5_serdes.c
2357
2358 static int sparx5_serdes_probe(struct platform_device *pdev)
2359 {
2360 struct device_node *np = pdev->dev.of_node;
2361 struct sparx5_serdes_private *priv;
2362 struct phy_provider *provider;
2363 struct resource *iores;
2364 void __iomem *iomem;
2365 unsigned long clock;
2366 struct clk *clk;
2367 int idx;
2368 int err;
2369
2370 if (!np && !pdev->dev.platform_data)
2371 return -ENODEV;
2372
2373 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
2374 if (!priv)
2375 return -ENOMEM;
2376
2377 platform_set_drvdata(pdev, priv);
2378 priv->dev = &pdev->dev;
2379
2380 /* Get coreclock */
2381 clk = devm_clk_get(priv->dev, NULL);
2382 if (IS_ERR(clk)) {
2383 dev_err(priv->dev, "Failed to get coreclock\n");
2384 return PTR_ERR(clk);
2385 }
2386 clock = clk_get_rate(clk);
2387 if (clock == 0) {
2388 dev_err(priv->dev, "Invalid coreclock %lu\n", clock);
2389 return -EINVAL;
2390 }
2391 priv->coreclock = clock;
2392
> 2393 iores = platform_get_resource(pdev, IORESOURCE_MEM, idx);
2394 iomem = devm_ioremap(priv->dev, iores->start, iores->end - iores->start + 1);
2395 if (IS_ERR(iomem)) {
2396 dev_err(priv->dev, "Unable to get serdes registers: %s\n",
2397 iores->name);
2398 return PTR_ERR(iomem);
2399 }
2400 for (idx = 0; idx < ARRAY_SIZE(sparx5_serdes_iomap); idx++) {
2401 struct sparx5_serdes_io_resource *iomap = &sparx5_serdes_iomap[idx];
2402
2403 priv->regs[iomap->id] = iomem + iomap->phys - iores->start;
2404 }
2405 for (idx = 0; idx < SPX5_SERDES_MAX; idx++) {
2406 err = sparx5_phy_create(priv, idx, &priv->phys[idx]);
2407 if (err)
2408 return err;
2409 }
2410
2411 provider = devm_of_phy_provider_register(priv->dev, sparx5_serdes_xlate);
2412
2413 return PTR_ERR_OR_ZERO(provider);
2414 }
2415
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28674 bytes --]
next prev parent reply other threads:[~2020-12-02 21:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-02 13:04 [PATCH v7 0/4] Adding the Sparx5 Serdes driver Steen Hegelund
2020-12-02 13:04 ` [PATCH v7 1/4] dt-bindings: phy: Add sparx5-serdes bindings Steen Hegelund
2020-12-02 13:04 ` [PATCH v7 2/4] phy: Add ethernet serdes configuration option Steen Hegelund
2020-12-02 13:04 ` [PATCH v7 3/4] phy: Add Sparx5 ethernet serdes PHY driver Steen Hegelund
2020-12-02 15:09 ` kernel test robot
2020-12-02 21:24 ` kernel test robot [this message]
2020-12-02 13:04 ` [PATCH v7 4/4] arm64: dts: sparx5: Add Sparx5 serdes driver node Steen Hegelund
2020-12-02 22:21 ` [PATCH v7 0/4] Adding the Sparx5 Serdes driver Vladimir Oltean
2020-12-03 8:06 ` Steen Hegelund
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=202012030553.ttaoZe01-lkp@intel.com \
--to=lkp@intel.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=bjarni.jonasson@microchip.com \
--cc=clang-built-linux@googlegroups.com \
--cc=kbuild-all@lists.01.org \
--cc=kishon@ti.com \
--cc=lars.povlsen@microchip.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=steen.hegelund@microchip.com \
--cc=vkoul@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