drivers/i2c/busses/i2c-i801.c:1014:21: error: dereferenci
Hi Fengguang,
Quoted 25 lines · Fengguang Wu
Hi Jean,
FYI, kernel build failed on
tree: git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging.git i2c-for-linus head: c415b303a704e5c5f766fc0404093910c36cc4ab commit: 3ad7ea18ae8c7ddda46b7276e0bda73e707ea9c1 [9/15] i2c-i801: Support SMBus multiplexing on Asus Z8 series config: parisc-allyesconfigIt's also failing in Linus' master and linux-next.
All error/warnings:
drivers/i2c/busses/i2c-i801.c: In function 'match_gpio_chip_by_label':drivers/i2c/busses/i2c-i801.c:1014:21: error: dereferencing pointer to incomplete typedrivers/i2c/busses/i2c-i801.c: In function 'i801_add_mux':drivers/i2c/busses/i2c-i801.c:1031:2: error: implicit declaration of function 'gpiochip_find' [-Werror=implicit-function-declaration]drivers/i2c/busses/i2c-i801.c:1031:7: warning: assignment makes pointer from integer without a cast [enabled by default]drivers/i2c/busses/i2c-i801.c:1050:27: error: dereferencing pointer to incomplete typedrivers/i2c/busses/i2c-i801.c: In function 'match_gpio_chip_by_label':drivers/i2c/busses/i2c-i801.c:1015:1: warning: control reaches end of non-void function [-Wreturn-type]
cc1: some warnings being treated as errorsvim +1014
drivers/i2c/busses/i2c-i801.c
Quoted 10 lines
3ad7ea18 Jean Delvare 2012-10-05 1008 { }
3ad7ea18 Jean Delvare 2012-10-05 1009 };
3ad7ea18 Jean Delvare 2012-10-05 1010
3ad7ea18 Jean Delvare 2012-10-05 1011 static int __devinit match_gpio_chip_by_label(struct gpio_chip *chip,
3ad7ea18 Jean Delvare 2012-10-05 1012 void *data)
3ad7ea18 Jean Delvare 2012-10-05 1013 {
3ad7ea18 Jean Delvare 2012-10-05 @1014 return !strcmp(chip->label, data);
3ad7ea18 Jean Delvare 2012-10-05 1015 }
3ad7ea18 Jean Delvare 2012-10-05 1016
3ad7ea18 Jean Delvare 2012-10-05 1017 /* Setup multiplexing if needed */This code was removed by a later patch (i2c-i801: Let i2c-mux-gpio find the GPIO chip) so investigating this build failure has little interest at this point.
If you can still reproduce a similar build failure with Linus' latest kernel (which has this second patch included) or today's linux-next then please send the new error log together with the config file triggering it. I tried hard to reproduce the problem but did not succeed so far.
Signature · 1 line
Jean Delvare
Re: [jdelvare-staging:i2c-for-linus 9/15] drivers/tty/serial/max310x.c:277:19: error: field 'gpio'
Quoted 22 lines · Fengguang Wu
Hi Jean,
FYI, kernel build failed on
tree: git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging.git i2c-for-linus head: c415b303a704e5c5f766fc0404093910c36cc4ab commit: 3ad7ea18ae8c7ddda46b7276e0bda73e707ea9c1 [9/15] i2c-i801: Support SMBus multiplexing on Asus Z8 series config: parisc-allyesconfig # make ARCH=parisc allyesconfigAll error/warnings:
drivers/tty/serial/max310x.c:277:19: error: field 'gpio' has incomplete typedrivers/tty/serial/max310x.c: In function 'max310x_gpio_get':drivers/tty/serial/max310x.c:941:27: warning: initialization from incompatible pointer type [enabled by default]drivers/tty/serial/max310x.c:941:27: warning: (near initialization for 's') [enabled by default]drivers/tty/serial/max310x.c: In function 'max310x_gpio_set':drivers/tty/serial/max310x.c:952:27: warning: initialization from incompatible pointer type [enabled by default]drivers/tty/serial/max310x.c:952:27: warning: (near initialization for 's') [enabled by default]drivers/tty/serial/max310x.c: In function 'max310x_gpio_direction_input':drivers/tty/serial/max310x.c:962:27: warning: initialization from incompatible pointer type [enabled by default]drivers/tty/serial/max310x.c:962:27: warning: (near initialization for 's') [enabled by default]
Quoted 8 lines
drivers/tty/serial/max310x.c: In function 'max310x_gpio_direction_output':drivers/tty/serial/max310x.c:976:27: warning: initialization from incompatible pointer type [enabled by default]drivers/tty/serial/max310x.c:976:27: warning: (near initialization for 's') [enabled by default]drivers/tty/serial/max310x.c: In function 'max310x_probe':drivers/tty/serial/max310x.c:1181:3: error: implicit declaration of function 'gpiochip_add' [-Werror=implicit-function-declaration]drivers/tty/serial/max310x.c: In function 'max310x_remove':drivers/tty/serial/max310x.c:1223:3: error: implicit declaration of function 'gpiochip_remove' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
Thanks for reporting. Please check if the following patch fixes it:
From: Jean Delvare <[email protected]>
Subject: i2c-i801: Simplify dependency towards GPIOLIB
Arbitrarily selecting GPIOLIB causes trouble on some architectures, so don't do that. Instead, just make the optional multiplexing code depend on CONFIG_I2C_MUX_GPIO instead of CONFIG_I2C_MUX for now. We can revisit if the i2c-i801 driver ever supports other multiplexing flavors.
Also make that optional code depend on DMI, as it won't do anything without that.
--- drivers/i2c/busses/Kconfig | 1 - drivers/i2c/busses/i2c-i801.c | 9 ++++++--- 2 files changed, 6 insertions(+), 4 deletions(-)
drivers/i2c/busses/Kconfig +0 -1
@@ -81,7 +81,6 @@ config I2C_I801 tristate "Intel 82801 (ICH/PCH)" depends on PCI select CHECK_SIGNATURE if X86 && DMI - select GPIOLIB if I2C_MUX help If you say yes to this option, support will be included for the Intel 801 family of mainboard I2C interfaces. Specifically, the following
drivers/i2c/busses/i2c-i801.c +6 -3
@@ -83,7 +83,8 @@#include <linux/err.h> #include <linux/of_i2c.h> -#if definedCONFIG_I2C_MUX || definedCONFIG_I2C_MUX_MODULE +#if (definedCONFIG_I2C_MUX_GPIO || definedCONFIG_I2C_MUX_GPIO_MODULE ) && \ + definedCONFIG_DMI #include <linux/gpio.h> #include <linux/i2c-mux-gpio.h> #include <linux/platform_device.h>
@@ -193,7 +194,8 @@ struct i801_priv {int len;u8 *data; -#if definedCONFIG_I2C_MUX || definedCONFIG_I2C_MUX_MODULE +#if (definedCONFIG_I2C_MUX_GPIO || definedCONFIG_I2C_MUX_GPIO_MODULE ) && \ + definedCONFIG_DMI const struct i801_mux_config *mux_drvdata;struct platform_device *mux_pdev;#endif
@@ -922,7 +924,8 @@ static void __init input_apanel_init(voistatic void __devinit i801_probe_optional_slaves (struct i801_priv *priv) {}#endif /* CONFIG_X86 && CONFIG_DMI */ -#if definedCONFIG_I2C_MUX || definedCONFIG_I2C_MUX_MODULE +#if (definedCONFIG_I2C_MUX_GPIO || definedCONFIG_I2C_MUX_GPIO_MODULE ) && \ + definedCONFIG_DMI static struct i801_mux_config i801_mux_config_asus_z8_d12 = { .gpio_chip ="gpio_ich" , .values = { 0x02, 0x03 },
Signature · 1 line
Jean Delvare
Re: [jdelvare-staging:i2c-for-linus 9/15] drivers/input/keyboard/adp5588-keys.c:52:19: error: field
In reply to Jean DelvareHi Fengguang,
Quoted 8 lines · Fengguang Wu
Hi Jean,
FYI, kernel build failed on
tree: git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging.git i2c-for-linus head: c415b303a704e5c5f766fc0404093910c36cc4ab commit: 3ad7ea18ae8c7ddda46b7276e0bda73e707ea9c1 [9/15] i2c-i801: Support SMBus multiplexing on Asus Z8 series config: parisc-allyesconfig # make ARCH=parisc allyesconfig
I sent you a patch yesterday which should fix the issue:
http://khali.linux-fr.org/devel/linux-3/jdelvare-i2c/i2c-i801-02-fix-gpiolib-dependency.patch
It's in linux-next already. Can you please test it and confirm it does fix the issue?
Thanks,
Signature · 1 line
Jean Delvare
Re: [jdelvare-staging:i2c-for-linus 9/15] drivers/input/keyboard/adp5588-keys.c:52:19: error: field
In reply to Jean DelvareQuoted 8 lines · Fengguang Wu
Quoted 4 lines · Jean Delvare
I sent you a patch yesterday which should fix the issue:
http://khali.linux-fr.org/devel/linux-3/jdelvare-i2c/i2c-i801-02-fix-gpiolib-dependency.patch
It's in linux-next already. Can you please test it and confirm it does fix the issue?Hi Jean, I just sent you another report. I found that it can still be reproduced in upstream 3.7-rc2 and linux-next 20121019.
It turns out that linux-next no longer seems to include my i2c patches. Stephen, can you please check?
Thanks,
Signature · 1 line
Jean Delvare
Re: [jdelvare-staging:i2c-for-linus 9/15] drivers/input/keyboard/adp5588-keys.c:52:19: error: field
In reply to Jean DelvareHi Jean,
Quoted 8 lines · On Sun, 21 Oct 2012 14:16:59 +0200 Jean Delvare <[email protected]> wrote:
Quoted 6 lines · Fengguang Wu
Quoted 4 lines · Jean Delvare
I sent you a patch yesterday which should fix the issue:
http://khali.linux-fr.org/devel/linux-3/jdelvare-i2c/i2c-i801-02-fix-gpiolib-dependency.patch
It's in linux-next already. Can you please test it and confirm it does fix the issue?
Quoted 5 lines
Quoted 2 lines
Hi Jean, I just sent you another report. I found that it can still be reproduced in upstream 3.7-rc2 and linux-next 20121019.
It turns out that linux-next no longer seems to include my i2c patches. Stephen, can you please check?
I haven't changed anything about the i2c tree. I fetch a quilt series from http://khali.linux-fr.org/devel/linux-3/jdelvare-i2c/ . The last change I have seen was on October 16 (my time) and the series contained only one patch for linux-next: i2c-move-i2c-stub.patch .
I just refetched it and the only change was to now be based on v3.7-rc2. Do you have your NEXT_PATCHES_START/END markers in the right place?
Signature · 2 lines
Cheers, Stephen Rothwell [email protected]