linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* i2c-designware-core: KBUILD_MODNAME undeclared [was: Build regressions/improvements in v3.6-rc1]
       [not found] <1344072256-13170-1-git-send-email-geert@linux-m68k.org>
@ 2012-08-15 20:01 ` Jiri Slaby
  2012-08-31 12:44   ` Jean Delvare
  0 siblings, 1 reply; 3+ messages in thread
From: Jiri Slaby @ 2012-08-15 20:01 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: linux-kernel, dirk.brandewie, khali, linux-i2c, Michal Marek,
	linux-kbuild, jbaron, ben-linux, Jiri Slaby

On 08/04/2012 11:24 AM, Geert Uytterhoeven wrote:
> Below is the list of build error/warning regressions/improvements in
> v3.6-rc1[1] compared to v3.5[2].
...
>   + drivers/i2c/busses/i2c-designware-core.c: error: 'KBUILD_MODNAME' undeclared (first use in this function):

This is a real problem we are facing here. It happens on PPC when all
I2C_DESIGNWARE_PLATFORM, I2C_DESIGNWARE_PCI and DYNAMIC_DEBUG are set.

It's because i2c-designware-core.c is used in two modules
(i2c-designware-platform and i2c-designware-pci) and KBUILD_MODNAME is
not defined for those because (scripts/Makefile.lib):
# $(modname_flags) #defines KBUILD_MODNAME as the name of the module
# it will end up in (or would, if it gets compiled in)
# Note: Files that end up in two or more modules are compiled
#       without the KBUILD_MODNAME definition. The reason is
#       that any made-up name would differ in different configs.

But DYNAMIC_DEBUG needs KBUILD_MODNAME for dev_dbg used in that source.

Any ideas? Why is it not a separate module for example?

thanks,
-- 
js
suse labs

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: i2c-designware-core: KBUILD_MODNAME undeclared [was: Build regressions/improvements  in v3.6-rc1]
  2012-08-15 20:01 ` i2c-designware-core: KBUILD_MODNAME undeclared [was: Build regressions/improvements in v3.6-rc1] Jiri Slaby
@ 2012-08-31 12:44   ` Jean Delvare
       [not found]     ` <20120831144429.554345d0-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Jean Delvare @ 2012-08-31 12:44 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: Geert Uytterhoeven, linux-kernel, dirk.brandewie, linux-i2c,
	Michal Marek, linux-kbuild, jbaron, ben-linux, Jiri Slaby

Hi Jiri, Geert,

On Wed, 15 Aug 2012 22:01:38 +0200, Jiri Slaby wrote:
> On 08/04/2012 11:24 AM, Geert Uytterhoeven wrote:
> > Below is the list of build error/warning regressions/improvements in
> > v3.6-rc1[1] compared to v3.5[2].
> ...
> >   + drivers/i2c/busses/i2c-designware-core.c: error: 'KBUILD_MODNAME' undeclared (first use in this function):
> 
> This is a real problem we are facing here. It happens on PPC when all
> I2C_DESIGNWARE_PLATFORM, I2C_DESIGNWARE_PCI and DYNAMIC_DEBUG are set.
> 
> It's because i2c-designware-core.c is used in two modules
> (i2c-designware-platform and i2c-designware-pci) and KBUILD_MODNAME is
> not defined for those because (scripts/Makefile.lib):
> # $(modname_flags) #defines KBUILD_MODNAME as the name of the module
> # it will end up in (or would, if it gets compiled in)
> # Note: Files that end up in two or more modules are compiled
> #       without the KBUILD_MODNAME definition. The reason is
> #       that any made-up name would differ in different configs.
> 
> But DYNAMIC_DEBUG needs KBUILD_MODNAME for dev_dbg used in that source.
> 
> Any ideas? Why is it not a separate module for example?

It should be. Axel Lin has posted a patch which does that and it should
fix your problem:
https://lkml.org/lkml/2012/6/13/233

Please test and confirm it does the right thing. I'll push the patch
upstream if it does.

-- 
Jean Delvare

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: i2c-designware-core: KBUILD_MODNAME undeclared [was: Build regressions/improvements in v3.6-rc1]
       [not found]     ` <20120831144429.554345d0-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
@ 2012-08-31 13:18       ` Jiri Slaby
  0 siblings, 0 replies; 3+ messages in thread
From: Jiri Slaby @ 2012-08-31 13:18 UTC (permalink / raw)
  To: Jean Delvare
  Cc: Geert Uytterhoeven, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	dirk.brandewie-Re5JQEeQqe8AvxtiuMwx3w,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA, Michal Marek,
	linux-kbuild-u79uwXL29TY76Z2rM5mHXA,
	jbaron-H+wXaHxf7aLQT0dZR+AlfA, ben-linux-elnMNo+KYs3YtjvyW6yDsg,
	Jiri Slaby

On 08/31/2012 02:44 PM, Jean Delvare wrote:
> Hi Jiri, Geert,
> 
> On Wed, 15 Aug 2012 22:01:38 +0200, Jiri Slaby wrote:
>> On 08/04/2012 11:24 AM, Geert Uytterhoeven wrote:
>>> Below is the list of build error/warning regressions/improvements in
>>> v3.6-rc1[1] compared to v3.5[2].
>> ...
>>>   + drivers/i2c/busses/i2c-designware-core.c: error: 'KBUILD_MODNAME' undeclared (first use in this function):
>>
>> This is a real problem we are facing here. It happens on PPC when all
>> I2C_DESIGNWARE_PLATFORM, I2C_DESIGNWARE_PCI and DYNAMIC_DEBUG are set.
>>
>> It's because i2c-designware-core.c is used in two modules
>> (i2c-designware-platform and i2c-designware-pci) and KBUILD_MODNAME is
>> not defined for those because (scripts/Makefile.lib):
>> # $(modname_flags) #defines KBUILD_MODNAME as the name of the module
>> # it will end up in (or would, if it gets compiled in)
>> # Note: Files that end up in two or more modules are compiled
>> #       without the KBUILD_MODNAME definition. The reason is
>> #       that any made-up name would differ in different configs.
>>
>> But DYNAMIC_DEBUG needs KBUILD_MODNAME for dev_dbg used in that source.
>>
>> Any ideas? Why is it not a separate module for example?
> 
> It should be. Axel Lin has posted a patch which does that and it should
> fix your problem:
> https://lkml.org/lkml/2012/6/13/233
> 
> Please test and confirm it does the right thing. I'll push the patch
> upstream if it does.

Yes, it does.

thanks,
-- 
js
suse labs

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-08-31 13:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1344072256-13170-1-git-send-email-geert@linux-m68k.org>
2012-08-15 20:01 ` i2c-designware-core: KBUILD_MODNAME undeclared [was: Build regressions/improvements in v3.6-rc1] Jiri Slaby
2012-08-31 12:44   ` Jean Delvare
     [not found]     ` <20120831144429.554345d0-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2012-08-31 13:18       ` Jiri Slaby

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).