* drivers/hwmon/tmp513.c:163:10: error: 'const struct regmap_config' has no member named 'reg_bits'
@ 2024-10-01 18:19 kernel test robot
2024-10-01 18:53 ` Javier Carrasco
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2024-10-01 18:19 UTC (permalink / raw)
To: Javier Carrasco; +Cc: oe-kbuild-all, linux-kernel, Guenter Roeck
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: e32cde8d2bd7d251a8f9b434143977ddf13dcec6
commit: 4bc82dd20be09fa133bf3116be6afc933497f860 hwmon: (tmp513) Constify struct regmap_config
date: 3 months ago
config: x86_64-randconfig-r133-20240215 (https://download.01.org/0day-ci/archive/20241002/202410020246.2cTDDx0X-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241002/202410020246.2cTDDx0X-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/202410020246.2cTDDx0X-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/hwmon/tmp513.c:162:21: error: variable 'tmp51x_regmap_config' has initializer but incomplete type
162 | static const struct regmap_config tmp51x_regmap_config = {
| ^~~~~~~~~~~~~
>> drivers/hwmon/tmp513.c:163:10: error: 'const struct regmap_config' has no member named 'reg_bits'
163 | .reg_bits = 8,
| ^~~~~~~~
drivers/hwmon/tmp513.c:163:21: warning: excess elements in struct initializer
163 | .reg_bits = 8,
| ^
drivers/hwmon/tmp513.c:163:21: note: (near initialization for 'tmp51x_regmap_config')
>> drivers/hwmon/tmp513.c:164:10: error: 'const struct regmap_config' has no member named 'val_bits'
164 | .val_bits = 16,
| ^~~~~~~~
drivers/hwmon/tmp513.c:164:21: warning: excess elements in struct initializer
164 | .val_bits = 16,
| ^~
drivers/hwmon/tmp513.c:164:21: note: (near initialization for 'tmp51x_regmap_config')
>> drivers/hwmon/tmp513.c:165:10: error: 'const struct regmap_config' has no member named 'max_register'
165 | .max_register = TMP51X_MAX_REGISTER_ADDR,
| ^~~~~~~~~~~~
drivers/hwmon/tmp513.c:79:41: warning: excess elements in struct initializer
79 | #define TMP51X_MAX_REGISTER_ADDR 0xFF
| ^~~~
drivers/hwmon/tmp513.c:165:25: note: in expansion of macro 'TMP51X_MAX_REGISTER_ADDR'
165 | .max_register = TMP51X_MAX_REGISTER_ADDR,
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/hwmon/tmp513.c:79:41: note: (near initialization for 'tmp51x_regmap_config')
79 | #define TMP51X_MAX_REGISTER_ADDR 0xFF
| ^~~~
drivers/hwmon/tmp513.c:165:25: note: in expansion of macro 'TMP51X_MAX_REGISTER_ADDR'
165 | .max_register = TMP51X_MAX_REGISTER_ADDR,
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/hwmon/tmp513.c: In function 'tmp51x_probe':
drivers/hwmon/tmp513.c:726:24: error: implicit declaration of function 'devm_regmap_init_i2c' [-Werror=implicit-function-declaration]
726 | data->regmap = devm_regmap_init_i2c(client, &tmp51x_regmap_config);
| ^~~~~~~~~~~~~~~~~~~~
drivers/hwmon/tmp513.c:726:22: warning: assignment to 'struct regmap *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
726 | data->regmap = devm_regmap_init_i2c(client, &tmp51x_regmap_config);
| ^
drivers/hwmon/tmp513.c: At top level:
drivers/hwmon/tmp513.c:756:1: warning: data definition has no type or storage class
756 | module_i2c_driver(tmp51x_driver);
| ^~~~~~~~~~~~~~~~~
drivers/hwmon/tmp513.c:756:1: error: type defaults to 'int' in declaration of 'module_i2c_driver' [-Werror=implicit-int]
drivers/hwmon/tmp513.c:756:1: warning: parameter names (without types) in function declaration
drivers/hwmon/tmp513.c:162:35: error: storage size of 'tmp51x_regmap_config' isn't known
162 | static const struct regmap_config tmp51x_regmap_config = {
| ^~~~~~~~~~~~~~~~~~~~
drivers/hwmon/tmp513.c:747:26: warning: 'tmp51x_driver' defined but not used [-Wunused-variable]
747 | static struct i2c_driver tmp51x_driver = {
| ^~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +163 drivers/hwmon/tmp513.c
59dfa75e5d82a1 Eric Tremblay 2019-11-12 161
4bc82dd20be09f Javier Carrasco 2024-07-02 162 static const struct regmap_config tmp51x_regmap_config = {
59dfa75e5d82a1 Eric Tremblay 2019-11-12 @163 .reg_bits = 8,
59dfa75e5d82a1 Eric Tremblay 2019-11-12 @164 .val_bits = 16,
59dfa75e5d82a1 Eric Tremblay 2019-11-12 @165 .max_register = TMP51X_MAX_REGISTER_ADDR,
59dfa75e5d82a1 Eric Tremblay 2019-11-12 166 };
59dfa75e5d82a1 Eric Tremblay 2019-11-12 167
:::::: The code at line 163 was first introduced by commit
:::::: 59dfa75e5d82a1e1b3d090a1d51fc14f66844576 hwmon: Add driver for Texas Instruments TMP512/513 sensor chips.
:::::: TO: Eric Tremblay <etremblay@distech-controls.com>
:::::: CC: Guenter Roeck <linux@roeck-us.net>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: drivers/hwmon/tmp513.c:163:10: error: 'const struct regmap_config' has no member named 'reg_bits'
2024-10-01 18:19 drivers/hwmon/tmp513.c:163:10: error: 'const struct regmap_config' has no member named 'reg_bits' kernel test robot
@ 2024-10-01 18:53 ` Javier Carrasco
2024-10-01 20:32 ` Guenter Roeck
0 siblings, 1 reply; 3+ messages in thread
From: Javier Carrasco @ 2024-10-01 18:53 UTC (permalink / raw)
To: kernel test robot; +Cc: oe-kbuild-all, linux-kernel, Guenter Roeck
On 01/10/2024 20:19, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: e32cde8d2bd7d251a8f9b434143977ddf13dcec6
> commit: 4bc82dd20be09fa133bf3116be6afc933497f860 hwmon: (tmp513) Constify struct regmap_config
> date: 3 months ago
> config: x86_64-randconfig-r133-20240215 (https://download.01.org/0day-ci/archive/20241002/202410020246.2cTDDx0X-lkp@intel.com/config)
> compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241002/202410020246.2cTDDx0X-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/202410020246.2cTDDx0X-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
> drivers/hwmon/tmp513.c:162:21: error: variable 'tmp51x_regmap_config' has initializer but incomplete type
> 162 | static const struct regmap_config tmp51x_regmap_config = {
> | ^~~~~~~~~~~~~
>>> drivers/hwmon/tmp513.c:163:10: error: 'const struct regmap_config' has no member named 'reg_bits'
> 163 | .reg_bits = 8,
> | ^~~~~~~~
> drivers/hwmon/tmp513.c:163:21: warning: excess elements in struct initializer
> 163 | .reg_bits = 8,
> | ^
> drivers/hwmon/tmp513.c:163:21: note: (near initialization for 'tmp51x_regmap_config')
>>> drivers/hwmon/tmp513.c:164:10: error: 'const struct regmap_config' has no member named 'val_bits'
> 164 | .val_bits = 16,
> | ^~~~~~~~
> drivers/hwmon/tmp513.c:164:21: warning: excess elements in struct initializer
> 164 | .val_bits = 16,
> | ^~
> drivers/hwmon/tmp513.c:164:21: note: (near initialization for 'tmp51x_regmap_config')
>>> drivers/hwmon/tmp513.c:165:10: error: 'const struct regmap_config' has no member named 'max_register'
> 165 | .max_register = TMP51X_MAX_REGISTER_ADDR,
> | ^~~~~~~~~~~~
> drivers/hwmon/tmp513.c:79:41: warning: excess elements in struct initializer
> 79 | #define TMP51X_MAX_REGISTER_ADDR 0xFF
> | ^~~~
> drivers/hwmon/tmp513.c:165:25: note: in expansion of macro 'TMP51X_MAX_REGISTER_ADDR'
> 165 | .max_register = TMP51X_MAX_REGISTER_ADDR,
> | ^~~~~~~~~~~~~~~~~~~~~~~~
> drivers/hwmon/tmp513.c:79:41: note: (near initialization for 'tmp51x_regmap_config')
> 79 | #define TMP51X_MAX_REGISTER_ADDR 0xFF
> | ^~~~
> drivers/hwmon/tmp513.c:165:25: note: in expansion of macro 'TMP51X_MAX_REGISTER_ADDR'
> 165 | .max_register = TMP51X_MAX_REGISTER_ADDR,
> | ^~~~~~~~~~~~~~~~~~~~~~~~
> drivers/hwmon/tmp513.c: In function 'tmp51x_probe':
> drivers/hwmon/tmp513.c:726:24: error: implicit declaration of function 'devm_regmap_init_i2c' [-Werror=implicit-function-declaration]
> 726 | data->regmap = devm_regmap_init_i2c(client, &tmp51x_regmap_config);
> | ^~~~~~~~~~~~~~~~~~~~
> drivers/hwmon/tmp513.c:726:22: warning: assignment to 'struct regmap *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
> 726 | data->regmap = devm_regmap_init_i2c(client, &tmp51x_regmap_config);
> | ^
> drivers/hwmon/tmp513.c: At top level:
> drivers/hwmon/tmp513.c:756:1: warning: data definition has no type or storage class
> 756 | module_i2c_driver(tmp51x_driver);
> | ^~~~~~~~~~~~~~~~~
> drivers/hwmon/tmp513.c:756:1: error: type defaults to 'int' in declaration of 'module_i2c_driver' [-Werror=implicit-int]
> drivers/hwmon/tmp513.c:756:1: warning: parameter names (without types) in function declaration
> drivers/hwmon/tmp513.c:162:35: error: storage size of 'tmp51x_regmap_config' isn't known
> 162 | static const struct regmap_config tmp51x_regmap_config = {
> | ^~~~~~~~~~~~~~~~~~~~
> drivers/hwmon/tmp513.c:747:26: warning: 'tmp51x_driver' defined but not used [-Wunused-variable]
> 747 | static struct i2c_driver tmp51x_driver = {
> | ^~~~~~~~~~~~~
> cc1: some warnings being treated as errors
>
>
> vim +163 drivers/hwmon/tmp513.c
>
> 59dfa75e5d82a1 Eric Tremblay 2019-11-12 161
> 4bc82dd20be09f Javier Carrasco 2024-07-02 162 static const struct regmap_config tmp51x_regmap_config = {
> 59dfa75e5d82a1 Eric Tremblay 2019-11-12 @163 .reg_bits = 8,
> 59dfa75e5d82a1 Eric Tremblay 2019-11-12 @164 .val_bits = 16,
> 59dfa75e5d82a1 Eric Tremblay 2019-11-12 @165 .max_register = TMP51X_MAX_REGISTER_ADDR,
> 59dfa75e5d82a1 Eric Tremblay 2019-11-12 166 };
> 59dfa75e5d82a1 Eric Tremblay 2019-11-12 167
>
> :::::: The code at line 163 was first introduced by commit
> :::::: 59dfa75e5d82a1e1b3d090a1d51fc14f66844576 hwmon: Add driver for Texas Instruments TMP512/513 sensor chips.
>
> :::::: TO: Eric Tremblay <etremblay@distech-controls.com>
> :::::: CC: Guenter Roeck <linux@roeck-us.net>
>
The bug is not in that commit, the Kconfig entry for this driver is
missing a 'select REGMAP_I2C'. I just tested it and then it builds
without any issues.
I can send a patch to fix that, but I would like to know what commit it
really fixes: the one that introduced the driver as it already used
regmap and did not include the required select? Or the one from this
report because it triggered, even though it is not the real source of
the issue?
Thanks and best regards,
Javier Carrasco
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: drivers/hwmon/tmp513.c:163:10: error: 'const struct regmap_config' has no member named 'reg_bits'
2024-10-01 18:53 ` Javier Carrasco
@ 2024-10-01 20:32 ` Guenter Roeck
0 siblings, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2024-10-01 20:32 UTC (permalink / raw)
To: Javier Carrasco, kernel test robot; +Cc: oe-kbuild-all, linux-kernel
On 10/1/24 11:53, Javier Carrasco wrote:
[ ... ]
>
> The bug is not in that commit, the Kconfig entry for this driver is
> missing a 'select REGMAP_I2C'. I just tested it and then it builds
> without any issues.
>
> I can send a patch to fix that, but I would like to know what commit it
> really fixes: the one that introduced the driver as it already used
> regmap and did not include the required select? Or the one from this
> report because it triggered, even though it is not the real source of
> the issue?
>
I have no idea why this is reported now, but the problem was introduced with
the driver, and as you have noticed I already submitted a fix.
Thanks a lot for reviewing it!
Guenter
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-01 20:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-01 18:19 drivers/hwmon/tmp513.c:163:10: error: 'const struct regmap_config' has no member named 'reg_bits' kernel test robot
2024-10-01 18:53 ` Javier Carrasco
2024-10-01 20:32 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox