All of lore.kernel.org
 help / color / mirror / Atom feed
* disable modules and get "multiple definition" errors?
@ 2008-08-22  1:28 Kevin Diggs
  2008-08-22  8:39 ` Geert Uytterhoeven
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Diggs @ 2008-08-22  1:28 UTC (permalink / raw)
  To: linuxppc-dev

Hi,

	I am trying to do some compile testing of my cpufreq driver. If
I disable modules I am getting multiple definition errors of inline
functions:

inline volatile unsigned int get_PLL(void)
{
unsigned int ret;

         __asm__ __volatile__ ("mfspr %0,%1":
                 "=r"(ret):
                 "i"(SPRN_HID1)
         );

         return ret;
}

arch/powerpc/kernel/cpu/pll_if.o(.text+0x1c): In function `get_PLL':
: multiple definition of `get_PLL'
arch/powerpc/kernel/cpu/cpufreq/built-in.o(.text+0x0): first defined here

What am I doing wrong?

kevin

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

* Re: disable modules and get "multiple definition" errors?
  2008-08-22  1:28 disable modules and get "multiple definition" errors? Kevin Diggs
@ 2008-08-22  8:39 ` Geert Uytterhoeven
  0 siblings, 0 replies; 2+ messages in thread
From: Geert Uytterhoeven @ 2008-08-22  8:39 UTC (permalink / raw)
  To: Kevin Diggs; +Cc: linuxppc-dev

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1102 bytes --]

On Thu, 21 Aug 2008, Kevin Diggs wrote:
> 	I am trying to do some compile testing of my cpufreq driver. If
> I disable modules I am getting multiple definition errors of inline
> functions:
> 
> inline volatile unsigned int get_PLL(void)
> {
> unsigned int ret;
> 
>         __asm__ __volatile__ ("mfspr %0,%1":
>                 "=r"(ret):
>                 "i"(SPRN_HID1)
>         );
> 
>         return ret;
> }
> 
> arch/powerpc/kernel/cpu/pll_if.o(.text+0x1c): In function `get_PLL':
> : multiple definition of `get_PLL'
> arch/powerpc/kernel/cpu/cpufreq/built-in.o(.text+0x0): first defined here
> 
> What am I doing wrong?

You forgot to make the inline functions static?

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010

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

end of thread, other threads:[~2008-08-22  8:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-22  1:28 disable modules and get "multiple definition" errors? Kevin Diggs
2008-08-22  8:39 ` Geert Uytterhoeven

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.