lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 26 Jun 2019 17:29:56 +0900
From:   Chanwoo Choi <cw00.choi@...sung.com>
To:     Randy Dunlap <rdunlap@...radead.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        "linux-next@...r.kernel.org" <linux-next@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Cc:     Tomasz Figa <tomasz.figa@...il.com>,
        MyungJoo Ham <myungjoo.ham@...sung.com>
Subject: Re: [PATCH -next] extcon: fix fsa9480 Kconfig warning and build
 errors

Hi,

On 19. 6. 26. 오전 10:10, Randy Dunlap wrote:
> From: Randy Dunlap <rdunlap@...radead.org>
> 
> Fix Kconfig dependency warning and subsequent build errors caused by
> the Kconfig entry for EXTCON-FSA9480.  It should not select
> REGMAP_I2C unless I2C is already set/enabled.
> 
> WARNING: unmet direct dependencies detected for REGMAP_I2C
>   Depends on [n]: I2C [=n]
>   Selected by [y]:
>   - EXTCON_FSA9480 [=y] && EXTCON [=y] && INPUT [=y]
> 
> ../drivers/base/regmap/regmap-i2c.c: In function ‘regmap_smbus_byte_reg_read’:
> ../drivers/base/regmap/regmap-i2c.c:25:2: error: implicit declaration of function ‘i2c_smbus_read_byte_data’ [-Werror=implicit-function-declaration]
>   ret = i2c_smbus_read_byte_data(i2c, reg);
>   ^
> ../drivers/base/regmap/regmap-i2c.c: In function ‘regmap_smbus_byte_reg_write’:
> ../drivers/base/regmap/regmap-i2c.c:43:2: error: implicit declaration of function ‘i2c_smbus_write_byte_data’ [-Werror=implicit-function-declaration]
>   return i2c_smbus_write_byte_data(i2c, reg, val);
> ../drivers/base/regmap/regmap-i2c.c: In function ‘regmap_smbus_word_reg_read’:
> ../drivers/base/regmap/regmap-i2c.c:61:2: error: implicit declaration of function ‘i2c_smbus_read_word_data’ [-Werror=implicit-function-declaration]
>   ret = i2c_smbus_read_word_data(i2c, reg);
> ../drivers/base/regmap/regmap-i2c.c: In function ‘regmap_smbus_word_reg_write’:
> ../drivers/base/regmap/regmap-i2c.c:79:2: error: implicit declaration of function ‘i2c_smbus_write_word_data’ [-Werror=implicit-function-declaration]
>   return i2c_smbus_write_word_data(i2c, reg, val);
> ../drivers/base/regmap/regmap-i2c.c: In function ‘regmap_smbus_word_read_swapped’:
> ../drivers/base/regmap/regmap-i2c.c:97:2: error: implicit declaration of function ‘i2c_smbus_read_word_swapped’ [-Werror=implicit-function-declaration]
>   ret = i2c_smbus_read_word_swapped(i2c, reg);
> ../drivers/base/regmap/regmap-i2c.c: In function ‘regmap_smbus_word_write_swapped’:
> ../drivers/base/regmap/regmap-i2c.c:115:2: error: implicit declaration of function ‘i2c_smbus_write_word_swapped’ [-Werror=implicit-function-declaration]
>   return i2c_smbus_write_word_swapped(i2c, reg, val);
> ../drivers/base/regmap/regmap-i2c.c: In function ‘regmap_i2c_write’:
> ../drivers/base/regmap/regmap-i2c.c:129:2: error: implicit declaration of function ‘i2c_master_send’ [-Werror=implicit-function-declaration]
>   ret = i2c_master_send(i2c, data, count);
> ../drivers/base/regmap/regmap-i2c.c: In function ‘regmap_i2c_gather_write’:
> ../drivers/base/regmap/regmap-i2c.c:150:2: error: implicit declaration of function ‘i2c_check_functionality’ [-Werror=implicit-function-declaration]
>   if (!i2c_check_functionality(i2c->adapter, I2C_FUNC_NOSTART))
> ../drivers/base/regmap/regmap-i2c.c:163:2: error: implicit declaration of function ‘i2c_transfer’ [-Werror=implicit-function-declaration]
>   ret = i2c_transfer(i2c->adapter, xfer, 2);
> ../drivers/base/regmap/regmap-i2c.c: In function ‘regmap_i2c_smbus_i2c_write’:
> ../drivers/base/regmap/regmap-i2c.c:218:2: error: implicit declaration of function ‘i2c_smbus_write_i2c_block_data’ [-Werror=implicit-function-declaration]
>   return i2c_smbus_write_i2c_block_data(i2c, ((u8 *)data)[0], count,
> ../drivers/base/regmap/regmap-i2c.c: In function ‘regmap_i2c_smbus_i2c_read’:
> ../drivers/base/regmap/regmap-i2c.c:233:2: error: implicit declaration of function ‘i2c_smbus_read_i2c_block_data’ [-Werror=implicit-function-declaration]
>   ret = i2c_smbus_read_i2c_block_data(i2c, ((u8 *)reg)[0], val_size, val);
> 
> ../drivers/extcon/extcon-fsa9480.c: In function ‘fsa9480_module_init’:
> ../drivers/extcon/extcon-fsa9480.c:383:2: error: implicit declaration of function ‘i2c_add_driver’ [-Werror=implicit-function-declaration]
>   return i2c_add_driver(&fsa9480_i2c_driver);
> ../drivers/extcon/extcon-fsa9480.c: In function ‘fsa9480_module_exit’:
> ../drivers/extcon/extcon-fsa9480.c:389:2: error: implicit declaration of function ‘i2c_del_driver’ [-Werror=implicit-function-declaration]
>   i2c_del_driver(&fsa9480_i2c_driver);
> 
> Signed-off-by: Randy Dunlap <rdunlap@...radead.org>
> Cc: Tomasz Figa <tomasz.figa@...il.com>
> Cc: MyungJoo Ham <myungjoo.ham@...sung.com>
> Cc: Chanwoo Choi <cw00.choi@...sung.com>
> ---
> Found in mmotm; applies to linux-next.
> 
> To extcon maintainers:  there are a few more extcon driver Kconfig
> entries that seem to have this same problem of selecting REGMAP_I2C
> without checking that I2C is set/enabled.

Thanks for your fixup. I'll check it with more effort.
Applied it.

> 
>  drivers/extcon/Kconfig |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- mmotm-2019-0625-1620.orig/drivers/extcon/Kconfig
> +++ mmotm-2019-0625-1620/drivers/extcon/Kconfig
> @@ -39,7 +39,7 @@ config EXTCON_AXP288
>  
>  config EXTCON_FSA9480
>  	tristate "FSA9480 EXTCON Support"
> -	depends on INPUT
> +	depends on INPUT && I2C
>  	select IRQ_DOMAIN
>  	select REGMAP_I2C
>  	help
> 
> 
> 
> 


-- 
Best Regards,
Chanwoo Choi
Samsung Electronics

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ