2012-06-21 03:27:50

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the regulator tree

Hi all,

After merging the regulator tree, today's linux-next build (x86_64
allmodconfig) failed like this:

lp872x.c:(.text+0xb0699): undefined reference to `devm_regmap_init_i2c'
drivers/built-in.o: In function `lp872x_driver_init':
lp872x.c:(.init.text+0x81ac): undefined reference to `i2c_register_driver'
drivers/built-in.o: In function `lp872x_driver_exit':
lp872x.c:(.exit.text+0x37e): undefined reference to `i2c_del_driver'

CONFIG_I2C=m in this build.

Caused by commit 809d310c7e69 ("regulator: lp872x: Don't allow modular
build") but that was done to fix a different build problem.

I have used the regulator tree from next-20120619 again for today.
--
Cheers,
Stephen Rothwell [email protected]


Attachments:
(No filename) (731.00 B)
(No filename) (836.00 B)
Download all attachments

2012-06-21 08:13:26

by Kim, Milo

[permalink] [raw]
Subject: RE: linux-next: build failure after merge of the regulator tree

> Caused by commit 809d310c7e69 ("regulator: lp872x: Don't allow modular
> build") but that was done to fix a different build problem.

Sorry for this conflict.

Build config of lp872x driver has been changed as tristate.
And related undefined symbol error has been fixed.
(don't use devm_gpio_request_one() at this moment because it can not be exported.)

Please check patches below.

[PATCH 1/3] regulator: enable module build config for lp872x
[PATCH 2/3] regulator: replace devm_gpio_request_one() for loaded module

Thanks & BR
Milo -

2012-06-21 08:21:11

by Axel Lin

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the regulator tree

2012/6/21 Kim, Milo <[email protected]>:
>> Caused by commit 809d310c7e69 ("regulator: lp872x: Don't allow modular
>> build") but that was done to fix a different build problem.
>
> Sorry for this conflict.
>
> Build config of lp872x driver has been changed as tristate.
> And related undefined symbol error has been fixed.
> (don't use devm_gpio_request_one() at this moment because it can not be exported.)

I don't think this is the good way, other drivers may have this build problem.
I think we can fix it by having the patch exporting
devm_gpio_request_one upstrem ASAP.

BTW, In yesterday's linux-next tree, Andrew has below commit.

commit a291ede7be8359a8986740b11b93f9c80e40210b
Author: Andrew Morton <[email protected]>
Date: Wed Jun 20 09:55:47 2012 +1000

backlight-l4f00242t03-use-devm_gpio_request_one-fix

export devm_gpio_request_one() to modules

Cc: Alberto Panizzo <[email protected]>
Cc: Jingoo Han <[email protected]>
Cc: Richard Purdie <[email protected]>
Cc: Grant Likely <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>

Regards,
Axel

2012-06-21 08:42:55

by Kim, Milo

[permalink] [raw]
Subject: RE: linux-next: build failure after merge of the regulator tree

> BTW, In yesterday's linux-next tree, Andrew has below commit.
>
> commit a291ede7be8359a8986740b11b93f9c80e40210b
> Author: Andrew Morton <[email protected]>
> Date: Wed Jun 20 09:55:47 2012 +1000
>
> backlight-l4f00242t03-use-devm_gpio_request_one-fix
>
> export devm_gpio_request_one() to modules
>
> Cc: Alberto Panizzo <[email protected]>
> Cc: Jingoo Han <[email protected]>
> Cc: Richard Purdie <[email protected]>
> Cc: Grant Likely <[email protected]>
> Signed-off-by: Andrew Morton <[email protected]>

Axel,
Good, thanks a lot !

Mark,
Then please ignore the patch below.
'[PATCH 2/3] regulator: replace devm_gpio_request_one() for loaded module'
https://lkml.org/lkml/2012/6/21/62

But two patches are still valid.
'[PATCH 1/3] regulator: enable module build config for lp872x'
'[PATCH 3/3] regulator: change message level on probing lp872x driver'
https://lkml.org/lkml/2012/6/21/61
https://lkml.org/lkml/2012/6/21/57

Thanks & BR
Milo -

2012-06-21 09:14:37

by Mark Brown

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the regulator tree

On Thu, Jun 21, 2012 at 04:20:46PM +0800, Axel Lin wrote:

> I don't think this is the good way, other drivers may have this build problem.
> I think we can fix it by having the patch exporting
> devm_gpio_request_one upstrem ASAP.

This isn't any use until someone actually merges the patch which given
that it's for gpiolib could take a very long time.


Attachments:
(No filename) (355.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2012-06-21 09:46:26

by Mark Brown

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the regulator tree

On Thu, Jun 21, 2012 at 08:13:15AM +0000, Kim, Milo wrote:
> > Caused by commit 809d310c7e69 ("regulator: lp872x: Don't allow modular
> > build") but that was done to fix a different build problem.
>
> Sorry for this conflict.
>
> Build config of lp872x driver has been changed as tristate.
> And related undefined symbol error has been fixed.
> (don't use devm_gpio_request_one() at this moment because it can not be exported.)

I'm not going to apply those patches, they're a step back in terms of
driver quality. We just need to bodge the Kconfig dependencies until
the fix for gpiolib gets merged.


Attachments:
(No filename) (605.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2012-06-21 11:04:30

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the regulator tree

Hi Andrew,

On Thu, 21 Jun 2012 16:20:46 +0800 Axel Lin <[email protected]> wrote:
>
> 2012/6/21 Kim, Milo <[email protected]>:
> >> Caused by commit 809d310c7e69 ("regulator: lp872x: Don't allow modular
> >> build") but that was done to fix a different build problem.
> >
> > Sorry for this conflict.
> >
> > Build config of lp872x driver has been changed as tristate.
> > And related undefined symbol error has been fixed.
> > (don't use devm_gpio_request_one() at this moment because it can not be exported.)
>
> I don't think this is the good way, other drivers may have this build problem.
> I think we can fix it by having the patch exporting
> devm_gpio_request_one upstrem ASAP.
>
> BTW, In yesterday's linux-next tree, Andrew has below commit.
>
> commit a291ede7be8359a8986740b11b93f9c80e40210b
> Author: Andrew Morton <[email protected]>
> Date: Wed Jun 20 09:55:47 2012 +1000
>
> backlight-l4f00242t03-use-devm_gpio_request_one-fix
>
> export devm_gpio_request_one() to modules
>
> Cc: Alberto Panizzo <[email protected]>
> Cc: Jingoo Han <[email protected]>
> Cc: Richard Purdie <[email protected]>
> Cc: Grant Likely <[email protected]>
> Signed-off-by: Andrew Morton <[email protected]>

This export is needed for a patch in the regulator tree, so can we have
that patch sent to Linus ASAP, please?

--
Cheers,
Stephen Rothwell [email protected]


Attachments:
(No filename) (1.42 kB)
(No filename) (836.00 B)
Download all attachments

2012-06-21 11:30:34

by Mark Brown

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the regulator tree

On Thu, Jun 21, 2012 at 09:04:12PM +1000, Stephen Rothwell wrote:

> This export is needed for a patch in the regulator tree, so can we have
> that patch sent to Linus ASAP, please?

It's going to affect pretty much anything that tries to use the API.


Attachments:
(No filename) (252.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2012-06-21 17:35:18

by Andrew Morton

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the regulator tree

On Thu, 21 Jun 2012 21:04:12 +1000 Stephen Rothwell <[email protected]> wrote:

> This export is needed for a patch in the regulator tree, so can we have
> that patch sent to Linus ASAP, please?

Shall do.

From: Andrew Morton <[email protected]>
Subject: drivers/gpio/devres.c: export devm_gpio_request_one() to modules

Several drivers in linux-next and possibly mainline are failing due to
this missing export.

Cc: Alberto Panizzo <[email protected]>
Cc: Jingoo Han <[email protected]>
Cc: Richard Purdie <[email protected]>
Cc: Grant Likely <[email protected]>
Cc: Mark Brown <[email protected]>
Cc: Stephen Rothwell <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---

drivers/gpio/devres.c | 1 +
1 file changed, 1 insertion(+)

diff -puN drivers/gpio/devres.c~drivers-gpio-devresc-export-devm_gpio_request_one-to-modules drivers/gpio/devres.c
--- a/drivers/gpio/devres.c~drivers-gpio-devresc-export-devm_gpio_request_one-to-modules
+++ a/drivers/gpio/devres.c
@@ -98,6 +98,7 @@ int devm_gpio_request_one(struct device

return 0;
}
+EXPORT_SYMBOL(devm_gpio_request_one);

/**
* devm_gpio_free - free an interrupt
_