From: kernel test robot <lkp@intel.com>
To: Wenliang <wenliang202407@163.com>, linux@roeck-us.net
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
jdelvare@suse.com, linux-hwmon@vger.kernel.org,
linux-kernel@vger.kernel.org, Wenliang <wenliang202407@163.com>
Subject: Re: [PATCH linux dev 6.11] hwmon:add new hwmon driver sq52205
Date: Mon, 26 Aug 2024 16:28:36 +0800 [thread overview]
Message-ID: <202408261627.lm2xKacD-lkp@intel.com> (raw)
In-Reply-To: <20240822074426.7241-1-wenliang202407@163.com>
Hi Wenliang,
kernel test robot noticed the following build errors:
[auto build test ERROR on linux/master]
url: https://github.com/intel-lab-lkp/linux/commits/Wenliang/hwmon-add-new-hwmon-driver-sq52205/20240826-103932
base: linux/master
patch link: https://lore.kernel.org/r/20240822074426.7241-1-wenliang202407%40163.com
patch subject: [PATCH linux dev 6.11] hwmon:add new hwmon driver sq52205
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20240826/202408261627.lm2xKacD-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240826/202408261627.lm2xKacD-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/202408261627.lm2xKacD-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/hwmon/sq52205.c:493:37: error: cannot assign to variable 'sq522xx_regmap_config' with const-qualified type 'const struct regmap_config'
493 | sq522xx_regmap_config.max_register = data->config->registers;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
drivers/hwmon/sq52205.c:67:35: note: variable 'sq522xx_regmap_config' declared const here
67 | static const struct regmap_config sq522xx_regmap_config = {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
68 | .reg_bits = 8,
| ~~~~~~~~~~~~~~
69 | .val_bits = 16,
| ~~~~~~~~~~~~~~~
70 | };
| ~
1 error generated.
vim +493 drivers/hwmon/sq52205.c
460
461 static int sq522xx_probe(struct i2c_client *client)
462 {
463 struct device *dev = &client->dev;
464 struct sq522xx_data *data;
465 struct device *hwmon_dev;
466 u32 val;
467 int ret, group = 0;
468 enum sq522xx_ids chip;
469
470 if (client->dev.of_node)
471 chip = (uintptr_t)of_device_get_match_data(&client->dev);
472 else
473 chip = i2c_match_id(sq522xx_id, client)->driver_data;
474
475 data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
476 if (!data)
477 return -ENOMEM;
478
479 /* set the device type */
480 data->client = client;
481 data->config = &sq522xx_config[chip];
482 mutex_init(&data->config_lock);
483
484 if (of_property_read_u32(dev->of_node, "shunt-resistor", &val) < 0)
485 val = SQ522XX_RSHUNT_DEFAULT;
486
487
488 if (val <= 0 || val > data->config->calibration_factor)
489 return -ENODEV;
490
491 data->rshunt = val;
492
> 493 sq522xx_regmap_config.max_register = data->config->registers;
494
495 data->regmap = devm_regmap_init_i2c(client, &sq522xx_regmap_config);
496 if (IS_ERR(data->regmap)) {
497 dev_err(dev, "failed to allocate register map\n");
498 return PTR_ERR(data->regmap);
499 }
500
501
502 ret = sq522xx_init(data);
503 if (ret < 0) {
504 dev_err(dev, "error configuring the device: %d\n", ret);
505 return -ENODEV;
506 }
507 if (chip == sq52205) {
508 ret = sq52205_init(data);
509 if (ret < 0) {
510 dev_err(dev, "error configuring the device cal: %d\n", ret);
511 return -ENODEV;
512 }
513 }
514
515 data->groups[group++] = &sq522xx_group;
516 if (chip == sq52205)
517 data->groups[group++] = &sq52205_group;
518
519 hwmon_dev = devm_hwmon_device_register_with_groups(dev, client->name,
520 data, data->groups);
521 if (IS_ERR(hwmon_dev))
522 return PTR_ERR(hwmon_dev);
523
524 dev_info(dev, "power monitor %s (Rshunt = %li uOhm)\n",
525 client->name, data->rshunt);
526
527 return 0;
528 }
529
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-08-26 8:28 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-12 15:42 [PATCH linux dev 6.11 1/2] hwmon driver sq52205 Wenliang
2024-08-12 16:41 ` Guenter Roeck
2024-08-22 7:44 ` [PATCH linux dev 6.11] hwmon:add new " Wenliang
2024-08-25 22:50 ` Guenter Roeck
2024-08-30 16:08 ` Guenter Roeck
2024-09-11 12:25 ` [PATCH linux dev-6.11 1/2] hwmon: modified ina2xx to match SY24655(SQ52205) Wenliang
2024-09-11 12:25 ` [PATCH linux dev-6.11 2/2] dt-bindings: " Wenliang
2024-09-11 17:49 ` Conor Dooley
2024-10-08 12:35 ` Krzysztof Kozlowski
2024-10-08 16:26 ` Conor Dooley
[not found] ` <6dcf956c.c4f1.1926bff1453.Coremail.wenliang202407@163.com>
2024-10-08 16:17 ` Conor Dooley
2024-09-11 15:15 ` [PATCH linux dev-6.11 1/2] hwmon: " Guenter Roeck
2024-10-12 7:06 ` [PATCH linux dev-6.11 1/2] v3: hwmon: modified ina2xx to match SY24655 Wenliang
2024-10-12 7:06 ` [PATCH linux dev-6.11 2/2] v3: dt-bindings: " Wenliang
2024-10-12 10:06 ` Krzysztof Kozlowski
2024-10-12 12:12 ` Guenter Roeck
2024-09-11 17:04 ` [PATCH linux dev-6.11 1/2] hwmon: modified ina2xx to match SY24655(SQ52205) Christophe JAILLET
[not found] ` <28adb212.c4f4.1926bff2cf0.Coremail.wenliang202407@163.com>
2024-10-08 16:37 ` [PATCH linux dev-6.11 1/2] v3: hwmon: modified ina2xx to match SY24655 Guenter Roeck
2024-08-26 8:28 ` kernel test robot [this message]
2024-08-26 16:46 ` [PATCH linux dev 6.11] hwmon:add new hwmon driver sq52205 kernel test robot
2024-09-13 5:29 ` kernel test robot
2024-09-13 23:49 ` kernel test robot
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=202408261627.lm2xKacD-lkp@intel.com \
--to=lkp@intel.com \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=wenliang202407@163.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 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.