[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <48498f47-1601-432b-bde5-f487668d1e85@stanley.mountain>
Date: Sat, 2 Nov 2024 11:37:18 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: oe-kbuild@...ts.linux.dev,
Andrei Stefanescu <andrei.stefanescu@....nxp.com>,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Chester Lin <chester62515@...il.com>,
Matthias Brugger <mbrugger@...e.com>,
Ghennadi Procopciuc <Ghennadi.Procopciuc@....com>,
Larisa Grigore <larisa.grigore@....com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>, Lee Jones <lee@...nel.org>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
Dong Aisheng <aisheng.dong@....com>, Jacky Bai <ping.bai@....com>
Cc: lkp@...el.com, oe-kbuild-all@...ts.linux.dev,
linux-gpio@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
NXP S32 Linux Team <s32@....com>,
Christophe Lizzi <clizzi@...hat.com>,
Alberto Ruiz <aruizrui@...hat.com>,
Enric Balletbo <eballetb@...hat.com>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
imx@...ts.linux.dev
Subject: Re: [PATCH v5 2/7] mfd: nxp-siul2: add support for NXP SIUL2
Hi Andrei,
kernel test robot noticed the following build warnings:
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Andrei-Stefanescu/dt-bindings-mfd-add-support-for-the-NXP-SIUL2-module/20241101-160940
base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
patch link: https://lore.kernel.org/r/20241101080614.1070819-3-andrei.stefanescu%40oss.nxp.com
patch subject: [PATCH v5 2/7] mfd: nxp-siul2: add support for NXP SIUL2
config: csky-randconfig-r072-20241102 (https://download.01.org/0day-ci/archive/20241102/202411021431.282g2yZy-lkp@intel.com/config)
compiler: csky-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@...el.com>
| Reported-by: Dan Carpenter <dan.carpenter@...aro.org>
| Closes: https://lore.kernel.org/r/202411021431.282g2yZy-lkp@intel.com/
smatch warnings:
drivers/mfd/nxp-siul2.c:311 nxp_siul2_init_regmap() error: uninitialized symbol 'ret'.
vim +/ret +311 drivers/mfd/nxp-siul2.c
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 267 static int nxp_siul2_init_regmap(struct platform_device *pdev,
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 268 void __iomem *base, int siul)
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 269 {
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 270 struct regmap_config regmap_configs[SIUL2_NUM_REG_TYPES] = {
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 271 [SIUL2_MPIDR] = nxp_siul2_regmap_generic_conf,
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 272 [SIUL2_IRQ] = nxp_siul2_regmap_irq_conf,
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 273 [SIUL2_MSCR] = nxp_siul2_regmap_generic_conf,
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 274 [SIUL2_IMCR] = nxp_siul2_regmap_generic_conf,
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 275 [SIUL2_PGPDO] = nxp_siul2_regmap_pgpdo_conf,
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 276 [SIUL2_PGPDI] = nxp_siul2_regmap_pgpdi_conf,
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 277 };
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 278 const struct nxp_siul2_reg_range_info *tmp_range;
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 279 struct regmap_config *tmp_conf;
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 280 struct nxp_siul2_info *info;
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 281 struct nxp_siul2_mfd *priv;
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 282 void __iomem *reg_start;
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 283 int i, ret;
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 284
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 285 priv = platform_get_drvdata(pdev);
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 286 info = &priv->siul2[siul];
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 287
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 288 for (i = 0; i < SIUL2_NUM_REG_TYPES; i++) {
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 289 if (!s32g2_reg_ranges[siul][i].valid)
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 290 continue;
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 291
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 292 tmp_range = &s32g2_reg_ranges[siul][i];
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 293 tmp_conf = ®map_configs[i];
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 294 tmp_conf->name = tmp_range->reg_name;
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 295 tmp_conf->max_register =
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 296 tmp_range->reg_end_offset - tmp_range->reg_start_offset;
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 297
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 298 if (tmp_conf->cache_type != REGCACHE_NONE)
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 299 tmp_conf->num_reg_defaults_raw =
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 300 tmp_conf->max_register / tmp_conf->reg_stride;
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 301
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 302 if (tmp_range->reg_access) {
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 303 tmp_conf->wr_table = tmp_range->reg_access;
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 304 tmp_conf->rd_table = tmp_range->reg_access;
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 305 }
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 306
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 307 reg_start = base + tmp_range->reg_start_offset;
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 308 info->regmaps[i] = devm_regmap_init_mmio(&pdev->dev, reg_start,
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 309 tmp_conf);
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 310 if (IS_ERR(info->regmaps[i])) {
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 @311 dev_err(&pdev->dev, "regmap %d init failed: %d\n", i,
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 312 ret);
Do this like: dev_err(&pdev->dev, "regmap %d init failed: %pe\n", i, info->regmaps[i]);
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 313 return PTR_ERR(info->regmaps[i]);
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 314 }
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 315 }
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 316
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 317 return 0;
5c0b3edcf6df17 Andrei Stefanescu 2024-11-01 318 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists