* [PATCH] eeprom: at24: also select REGMAP
@ 2023-06-08 2:54 Randy Dunlap
2023-06-08 7:59 ` Bartosz Golaszewski
0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2023-06-08 2:54 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, Heiner Kallweit, Bartosz Golaszewski, linux-i2c,
Arnd Bergmann, Mark Brown, Greg Kroah-Hartman, Masahiro Yamada
Selecting only REGMAP_I2C can leave REGMAP unset, causing build errors,
so also select REGMAP to prevent the build errors.
../drivers/misc/eeprom/at24.c:540:42: warning: 'struct regmap_config' declared inside parameter list will not be visible outside of this definition or declaration
540 | struct regmap_config *regmap_config)
../drivers/misc/eeprom/at24.c: In function 'at24_make_dummy_client':
../drivers/misc/eeprom/at24.c:552:18: error: implicit declaration of function 'devm_regmap_init_i2c' [-Werror=implicit-function-declaration]
552 | regmap = devm_regmap_init_i2c(dummy_client, regmap_config);
../drivers/misc/eeprom/at24.c:552:16: warning: assignment to 'struct regmap *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
552 | regmap = devm_regmap_init_i2c(dummy_client, regmap_config);
../drivers/misc/eeprom/at24.c: In function 'at24_probe':
../drivers/misc/eeprom/at24.c:586:16: error: variable 'regmap_config' has initializer but incomplete type
586 | struct regmap_config regmap_config = { };
../drivers/misc/eeprom/at24.c:586:30: error: storage size of 'regmap_config' isn't known
586 | struct regmap_config regmap_config = { };
../drivers/misc/eeprom/at24.c:586:30: warning: unused variable 'regmap_config' [-Wunused-variable]
Fixes: 5c015258478e ("eeprom: at24: add basic regmap_i2c support")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: linux-i2c@vger.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Mark Brown <broonie@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>
---
drivers/misc/eeprom/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff -- a/drivers/misc/eeprom/Kconfig b/drivers/misc/eeprom/Kconfig
--- a/drivers/misc/eeprom/Kconfig
+++ b/drivers/misc/eeprom/Kconfig
@@ -6,6 +6,7 @@ config EEPROM_AT24
depends on I2C && SYSFS
select NVMEM
select NVMEM_SYSFS
+ select REGMAP
select REGMAP_I2C
help
Enable this driver to get read/write support to most I2C EEPROMs
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] eeprom: at24: also select REGMAP
2023-06-08 2:54 [PATCH] eeprom: at24: also select REGMAP Randy Dunlap
@ 2023-06-08 7:59 ` Bartosz Golaszewski
0 siblings, 0 replies; 2+ messages in thread
From: Bartosz Golaszewski @ 2023-06-08 7:59 UTC (permalink / raw)
To: Randy Dunlap
Cc: linux-kernel, Heiner Kallweit, linux-i2c, Arnd Bergmann,
Mark Brown, Greg Kroah-Hartman, Masahiro Yamada
On Thu, Jun 8, 2023 at 4:54 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> Selecting only REGMAP_I2C can leave REGMAP unset, causing build errors,
> so also select REGMAP to prevent the build errors.
>
> ../drivers/misc/eeprom/at24.c:540:42: warning: 'struct regmap_config' declared inside parameter list will not be visible outside of this definition or declaration
> 540 | struct regmap_config *regmap_config)
> ../drivers/misc/eeprom/at24.c: In function 'at24_make_dummy_client':
> ../drivers/misc/eeprom/at24.c:552:18: error: implicit declaration of function 'devm_regmap_init_i2c' [-Werror=implicit-function-declaration]
> 552 | regmap = devm_regmap_init_i2c(dummy_client, regmap_config);
> ../drivers/misc/eeprom/at24.c:552:16: warning: assignment to 'struct regmap *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
> 552 | regmap = devm_regmap_init_i2c(dummy_client, regmap_config);
> ../drivers/misc/eeprom/at24.c: In function 'at24_probe':
> ../drivers/misc/eeprom/at24.c:586:16: error: variable 'regmap_config' has initializer but incomplete type
> 586 | struct regmap_config regmap_config = { };
> ../drivers/misc/eeprom/at24.c:586:30: error: storage size of 'regmap_config' isn't known
> 586 | struct regmap_config regmap_config = { };
> ../drivers/misc/eeprom/at24.c:586:30: warning: unused variable 'regmap_config' [-Wunused-variable]
>
> Fixes: 5c015258478e ("eeprom: at24: add basic regmap_i2c support")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Heiner Kallweit <hkallweit1@gmail.com>
> Cc: Bartosz Golaszewski <brgl@bgdev.pl>
> Cc: linux-i2c@vger.kernel.org
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Masahiro Yamada <masahiroy@kernel.org>
> ---
> drivers/misc/eeprom/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff -- a/drivers/misc/eeprom/Kconfig b/drivers/misc/eeprom/Kconfig
> --- a/drivers/misc/eeprom/Kconfig
> +++ b/drivers/misc/eeprom/Kconfig
> @@ -6,6 +6,7 @@ config EEPROM_AT24
> depends on I2C && SYSFS
> select NVMEM
> select NVMEM_SYSFS
> + select REGMAP
> select REGMAP_I2C
> help
> Enable this driver to get read/write support to most I2C EEPROMs
Applied, thanks!
Bart
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-06-08 8:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-08 2:54 [PATCH] eeprom: at24: also select REGMAP Randy Dunlap
2023-06-08 7:59 ` Bartosz Golaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).