Skip to contentSkip to conversation

disable modules and get "multiple definition" errors?

DISCUSSION Kevin Diggs 2 participants 2 messages Aug 22, 2008

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 16 lines · Kevin Diggs

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;
}
Quoted 5 lines

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:   [email protected]
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