Content-Type: multipart/mixed; boundary="===============0437445743834880245==" MIME-Version: 1.0 From: kbuild test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH v3 3/4] regulator: mpq7920: add mpq7920 regulator driver Date: Thu, 26 Dec 2019 05:59:14 +0800 Message-ID: <201912260536.tzKV8pVS%lkp@intel.com> In-Reply-To: <20191222204507.32413-4-sravanhome@gmail.com> List-Id: --===============0437445743834880245== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Saravanan, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on regulator/for-next] [also build test WARNING on robh/for-next linus/master v5.5-rc3 next-201912= 20] [if your patch is applied to the wrong git tree, please drop us a note to h= elp improve the system. BTW, we also suggest to use '--base' option to specify = the base tree in git format-patch, please see https://stackoverflow.com/a/37406= 982] url: https://github.com/0day-ci/linux/commits/Saravanan-Sekar/Add-regula= tor-support-for-mpq7920/20191225-005026 base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.g= it for-next reproduce: # apt-get install sparse # sparse version: v0.6.1-129-g341daf20-dirty make ARCH=3Dx86_64 allmodconfig make C=3D1 CF=3D'-fdiagnostic-prefix -D__CHECK_ENDIAN__' If you fix the issue, kindly add following tag Reported-by: kbuild test robot sparse warnings: (new ones prefixed by >>) >> drivers/regulator/mpq7920.c:339:44: sparse: sparse: Using plain integer = as NULL pointer >> drivers/regulator/mpq7920.c:317:21: sparse: sparse: incorrect type in as= signment (different modifiers) >> drivers/regulator/mpq7920.c:317:21: sparse: expected struct regulator= _ops *ops >> drivers/regulator/mpq7920.c:317:21: sparse: got struct regulator_ops = const *ops vim +339 drivers/regulator/mpq7920.c 306 = 307 static inline int mpq7920_regulator_register( 308 struct mpq7920_regulator_info *info, 309 struct regulator_config *config) 310 { 311 int i; 312 struct regulator_desc *rdesc; 313 struct regulator_ops *ops; 314 = 315 for (i =3D 0; i < MPQ7920_MAX_REGULATORS; i++) { 316 rdesc =3D &info->rdesc[i]; > 317 ops =3D rdesc->ops; 318 if (rdesc->curr_table) { 319 ops->get_current_limit =3D 320 regulator_get_current_limit_regmap; 321 ops->set_current_limit =3D 322 regulator_set_current_limit_regmap; 323 } 324 = 325 info->rdev[i] =3D devm_regulator_register(info->dev, rdesc, 326 config); 327 if (IS_ERR(info->rdev)) 328 return PTR_ERR(info->rdev); 329 } 330 = 331 return 0; 332 } 333 = 334 static int mpq7920_i2c_probe(struct i2c_client *client, 335 const struct i2c_device_id *id) 336 { 337 struct device *dev =3D &client->dev; 338 struct mpq7920_regulator_info *info; > 339 struct regulator_config config =3D { 0 }; 340 struct regmap *regmap; 341 int ret; 342 = 343 info =3D devm_kzalloc(dev, sizeof(struct mpq7920_regulator_info), 344 GFP_KERNEL); 345 if (!info) 346 return -ENOMEM; 347 = 348 info->dev =3D dev; 349 info->rdesc =3D mpq7920_regulators_desc; 350 regmap =3D devm_regmap_init_i2c(client, &mpq7920_regmap_config); 351 if (IS_ERR(regmap)) { 352 dev_err(dev, "Failed to allocate regmap!\n"); 353 return PTR_ERR(regmap); 354 } 355 = 356 i2c_set_clientdata(client, info); 357 info->regmap =3D regmap; 358 if (client->dev.of_node) 359 mpq7920_parse_dt(&client->dev, info); 360 = 361 config.dev =3D info->dev; 362 config.regmap =3D regmap; 363 config.driver_data =3D info; 364 = 365 ret =3D mpq7920_regulator_register(info, &config); 366 if (ret < 0) 367 dev_err(dev, "Failed to register regulator!\n"); 368 = 369 return ret; 370 } 371 = --- 0-DAY kernel test infrastructure Open Source Technology Cen= ter https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corpor= ation --===============0437445743834880245==--