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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdXPONxoNm+stn5sx579kzWo6auVP7hrRv26VSGySr7K2A@mail.gmail.com>
Date:	Wed, 4 Mar 2015 16:04:23 +0100
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	Chen Gang <xili_gchen_5257@...mail.com>,
	Pantelis Antoniou <pantelis.antoniou@...sulko.com>
Cc:	Grant Likely <grant.likely@...aro.org>,
	Rob Herring <robh+dt@...nel.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] of: Kconfig: Let OF_UNITTEST depend on "I2C=y" and "I2C_MUX=y"

On Wed, Mar 4, 2015 at 7:37 AM, Chen Gang <xili_gchen_5257@...mail.com> wrote:
> They need several symbols which are in I2C and I2C_MUX, the related
> error:
>
>   drivers/built-in.o: In function `selftest_i2c_mux_remove':
>   unittest.c:(.text+0xb0ce4): undefined reference to `i2c_del_mux_adapter'
>   unittest.c:(.text+0xb0ce8): undefined reference to `i2c_del_mux_adapter'
>   drivers/built-in.o: In function `selftest_i2c_mux_probe':
>   unittest.c:(.text+0xb0f20): undefined reference to `i2c_add_mux_adapter'
>   unittest.c:(.text+0xb0f24): undefined reference to `i2c_add_mux_adapter'
>   unittest.c:(.text+0xb0f94): undefined reference to `i2c_del_mux_adapter'
>   unittest.c:(.text+0xb0f9c): undefined reference to `i2c_del_mux_adapter'
>   drivers/built-in.o: In function `selftest_i2c_bus_remove':
>   unittest.c:(.text+0xb10cc): undefined reference to `i2c_del_adapter'
>   unittest.c:(.text+0xb10d4): undefined reference to `i2c_del_adapter'
>   drivers/built-in.o: In function `selftest_i2c_bus_probe':
>   unittest.c:(.text+0xb1298): undefined reference to `i2c_add_numbered_adapter'
>   unittest.c:(.text+0xb12a0): undefined reference to `i2c_add_numbered_adapter'
>   drivers/built-in.o: In function `of_selftest_overlay':
>   unittest.c:(.init.text+0xc9d0): undefined reference to `i2c_register_driver'
>   unittest.c:(.init.text+0xc9dc): undefined reference to `i2c_register_driver'
>   unittest.c:(.init.text+0xcdb4): undefined reference to `i2c_del_driver'
>   unittest.c:(.init.text+0xcdb8): undefined reference to `i2c_del_driver'
>   drivers/built-in.o: In function `of_selftest_device_exists':
>   unittest.c:(.text.unlikely+0xd70): undefined reference to `of_find_i2c_device_by_node'
>   unittest.c:(.text.unlikely+0xd7c): undefined reference to `of_find_i2c_device_by_node'
>   make: *** [vmlinux] Error 1
>
> Signed-off-by: Chen Gang <gang.chen.5i5j@...il.com>
> ---
>  drivers/of/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig
> index 7bcaeec..b60fc66 100644
> --- a/drivers/of/Kconfig
> +++ b/drivers/of/Kconfig
> @@ -9,7 +9,7 @@ menu "Device Tree and Open Firmware support"
>
>  config OF_UNITTEST
>         bool "Device Tree runtime unit tests"

As this is "bool"...

> -       depends on OF_IRQ && OF_EARLY_FLATTREE
> +       depends on OF_IRQ && OF_EARLY_FLATTREE && I2C=y && I2C_MUX=y

... I think it would be better to replace "#if IS_ENABLED(CONFIG_XXX)" by
"#ifdef CONFIG_XXX" in drivers/of/unittest.c instead.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ