From: kernel test robot <lkp@intel.com>
To: Rosen Penev <rosenp@gmail.com>, linux-omap@vger.kernel.org
Subject: Re: [PATCH] ARM: omap2: simplify allocation for omap_device
Date: Fri, 27 Mar 2026 16:30:57 +0800 [thread overview]
Message-ID: <202603271603.kDc2a9Vh-lkp@intel.com> (raw)
In-Reply-To: <20260326023432.54127-1-rosenp@gmail.com>
Hi Rosen,
kernel test robot noticed the following build warnings:
[auto build test WARNING on v7.0-rc5]
[also build test WARNING on linus/master next-20260326]
[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/Rosen-Penev/ARM-omap2-simplify-allocation-for-omap_device/20260327-022104
base: v7.0-rc5
patch link: https://lore.kernel.org/r/20260326023432.54127-1-rosenp%40gmail.com
patch subject: [PATCH] ARM: omap2: simplify allocation for omap_device
config: arm-randconfig-003-20260327 (https://download.01.org/0day-ci/archive/20260327/202603271603.kDc2a9Vh-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260327/202603271603.kDc2a9Vh-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/202603271603.kDc2a9Vh-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> arch/arm/mach-omap2/omap_device.c:325:3: warning: variable 'hwmods' is uninitialized when used here [-Wuninitialized]
325 | hwmods[i]->od = od;
| ^~~~~~
arch/arm/mach-omap2/omap_device.c:310:28: note: initialize the variable 'hwmods' to silence this warning
310 | struct omap_hwmod **hwmods;
| ^
| = NULL
1 warning generated.
vim +/hwmods +325 arch/arm/mach-omap2/omap_device.c
b04b65ab5b4fc8 arch/arm/plat-omap/omap_device.c Paul Walmsley 2009-09-03 292
a4f6cdb0672fe9 arch/arm/plat-omap/omap_device.c Benoit Cousson 2011-08-09 293 /**
a4f6cdb0672fe9 arch/arm/plat-omap/omap_device.c Benoit Cousson 2011-08-09 294 * omap_device_alloc - allocate an omap_device
a4f6cdb0672fe9 arch/arm/plat-omap/omap_device.c Benoit Cousson 2011-08-09 295 * @pdev: platform_device that will be included in this omap_device
7b6560b4bc623d arch/arm/mach-omap2/omap_device.c Ben Dooks (Codethink 2019-11-06 296) * @ohs: ptr to the omap_hwmod for this omap_device
7b6560b4bc623d arch/arm/mach-omap2/omap_device.c Ben Dooks (Codethink 2019-11-06 297) * @oh_cnt: the size of the ohs list
a4f6cdb0672fe9 arch/arm/plat-omap/omap_device.c Benoit Cousson 2011-08-09 298 *
a4f6cdb0672fe9 arch/arm/plat-omap/omap_device.c Benoit Cousson 2011-08-09 299 * Convenience function for allocating an omap_device structure and filling
c1d1cd597fc77a arch/arm/mach-omap2/omap_device.c Paul Walmsley 2013-01-26 300 * hwmods, and resources.
a4f6cdb0672fe9 arch/arm/plat-omap/omap_device.c Benoit Cousson 2011-08-09 301 *
a4f6cdb0672fe9 arch/arm/plat-omap/omap_device.c Benoit Cousson 2011-08-09 302 * Returns an struct omap_device pointer or ERR_PTR() on error;
a4f6cdb0672fe9 arch/arm/plat-omap/omap_device.c Benoit Cousson 2011-08-09 303 */
6aeb51c1035c1c arch/arm/mach-omap2/omap_device.c Arnd Bergmann 2022-09-28 304 static struct omap_device *omap_device_alloc(struct platform_device *pdev,
c1d1cd597fc77a arch/arm/mach-omap2/omap_device.c Paul Walmsley 2013-01-26 305 struct omap_hwmod **ohs, int oh_cnt)
a4f6cdb0672fe9 arch/arm/plat-omap/omap_device.c Benoit Cousson 2011-08-09 306 {
a4f6cdb0672fe9 arch/arm/plat-omap/omap_device.c Benoit Cousson 2011-08-09 307 int ret = -ENOMEM;
a4f6cdb0672fe9 arch/arm/plat-omap/omap_device.c Benoit Cousson 2011-08-09 308 struct omap_device *od;
c2b84a9bb3414c arch/arm/mach-omap2/omap_device.c Tony Lindgren 2017-10-10 309 int i;
a4f6cdb0672fe9 arch/arm/plat-omap/omap_device.c Benoit Cousson 2011-08-09 310 struct omap_hwmod **hwmods;
a4f6cdb0672fe9 arch/arm/plat-omap/omap_device.c Benoit Cousson 2011-08-09 311
d2740219a804bc arch/arm/mach-omap2/omap_device.c Rosen Penev 2026-03-25 312 od = kzalloc_flex(*od, hwmods, oh_cnt);
d2740219a804bc arch/arm/mach-omap2/omap_device.c Rosen Penev 2026-03-25 313 if (!od) {
d2740219a804bc arch/arm/mach-omap2/omap_device.c Rosen Penev 2026-03-25 314 dev_err(&pdev->dev, "omap_device: build failed (%d)\n", ret);
d2740219a804bc arch/arm/mach-omap2/omap_device.c Rosen Penev 2026-03-25 315 return ERR_PTR(ret);
d2740219a804bc arch/arm/mach-omap2/omap_device.c Rosen Penev 2026-03-25 316 }
6d9be9376b0e29 arch/arm/mach-omap2/omap_device.c Jing Xiangfeng 2020-09-19 317
a4f6cdb0672fe9 arch/arm/plat-omap/omap_device.c Benoit Cousson 2011-08-09 318 od->hwmods_cnt = oh_cnt;
d2740219a804bc arch/arm/mach-omap2/omap_device.c Rosen Penev 2026-03-25 319 memcpy(od->hwmods, ohs, oh_cnt * sizeof(*od->hwmods));
a4f6cdb0672fe9 arch/arm/plat-omap/omap_device.c Benoit Cousson 2011-08-09 320
a4f6cdb0672fe9 arch/arm/plat-omap/omap_device.c Benoit Cousson 2011-08-09 321 od->pdev = pdev;
a4f6cdb0672fe9 arch/arm/plat-omap/omap_device.c Benoit Cousson 2011-08-09 322 pdev->archdata.od = od;
a4f6cdb0672fe9 arch/arm/plat-omap/omap_device.c Benoit Cousson 2011-08-09 323
a4f6cdb0672fe9 arch/arm/plat-omap/omap_device.c Benoit Cousson 2011-08-09 324 for (i = 0; i < oh_cnt; i++) {
a4f6cdb0672fe9 arch/arm/plat-omap/omap_device.c Benoit Cousson 2011-08-09 @325 hwmods[i]->od = od;
a4f6cdb0672fe9 arch/arm/plat-omap/omap_device.c Benoit Cousson 2011-08-09 326 _add_hwmod_clocks_clkdev(od, hwmods[i]);
a4f6cdb0672fe9 arch/arm/plat-omap/omap_device.c Benoit Cousson 2011-08-09 327 }
a4f6cdb0672fe9 arch/arm/plat-omap/omap_device.c Benoit Cousson 2011-08-09 328
a4f6cdb0672fe9 arch/arm/plat-omap/omap_device.c Benoit Cousson 2011-08-09 329 return od;
a4f6cdb0672fe9 arch/arm/plat-omap/omap_device.c Benoit Cousson 2011-08-09 330 }
a4f6cdb0672fe9 arch/arm/plat-omap/omap_device.c Benoit Cousson 2011-08-09 331
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2026-03-27 8:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-26 2:34 [PATCH] ARM: omap2: simplify allocation for omap_device Rosen Penev
2026-03-27 8:30 ` 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=202603271603.kDc2a9Vh-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-omap@vger.kernel.org \
--cc=rosenp@gmail.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