[PATCH] qe_lib: export symbols to fix compile error when QE drivers compile as modules

Kumar Gala galak at kernel.crashing.org
Thu Oct 18 01:30:08 EST 2007


On May 25, 2007, at 7:15 AM, Kumar Gala wrote:

>
> On May 24, 2007, at 9:45 PM, Li Yang-r58472 wrote:
>
>>
>>> -----Original Message-----
>>> From: Kumar Gala [mailto:galak at kernel.crashing.org]
>>> Sent: Thursday, May 24, 2007 7:44 PM
>>> To: Li Yang-r58472
>>> Cc: Paul; linuxppc-dev at ozlabs.org
>>> Subject: Re: [PATCH] qe_lib: export symbols to fix compile error  
>>> when
>> QE drivers
>>> compile as modules
>>>
>>>
>>> On May 24, 2007, at 4:14 AM, Li Yang wrote:
>>>
>>>> Export symbols of qe_lib to be used by QE drivers.
>>>>
>>>> Signed-off-by: Li Yang <leoli at freescale.com>
>>>> ---
>>>> arch/powerpc/sysdev/qe_lib/ucc.c      |    7 +++++++
>>>> arch/powerpc/sysdev/qe_lib/ucc_fast.c |    8 ++++++++
>>>> arch/powerpc/sysdev/qe_lib/ucc_slow.c |   12 ++++++++++--
>>>> 3 files changed, 25 insertions(+), 2 deletions(-)
>>>
>>> A number of the EXPORT_SYMBOL() are not used by any in kernel  
>>> drivers
>>> and thus should not be added.  See comments below.  Also, should
>>> these be EXPORT_SYMBOL_GPL().
>>
>> Some of them are not used by in kernel driver, but they are used by
>> some
>> off kernel drivers and driver in development.  Shouldn't we export
>> them?
>
> Nope, its been a pretty established rule that we don't export symbols
> for drivers not in the kernel.  These drivers should really be
> submitted for acceptance into the kernel and than we can export the
> symbols they need.
>
> While I can see a need for the *slow* symbols to be exported until
> there is a driver needing them we shouldn't export the symbols.
>
>> I know Linux is again non-GPL modules, but Freescale won't be forcing
>> customers to use GPL as long as Linux doesn't ban non-GPL module
>> completely.
>
> That's fine.
>
>>>> static void get_cmxucr_reg(int ucc_num, volatile u32 ** p_cmxucr,
>>>> u8 * reg_num,
>>>> 			   u8 * shift)
>>>> @@ -122,6 +126,7 @@ static void get_cmxucr_reg(int ucc_num,
>>>> volatile u32 ** p_cmxucr, u8 * reg_num,
>>>> 		break;
>>>> 	}
>>>> }
>>>> +EXPORT_SYMBOL(get_cmxucr_reg);
>>>
>>> remove, you shouldn't be exporting something marked static.
>>
>> Good catch.
>>
>> Thanks,
>> Leo

What happened with this?

- k



More information about the Linuxppc-dev mailing list