* [PATCH] qe_lib: export symbols to fix compile error when QE drivers compile as modules
@ 2007-05-24 9:14 Li Yang
2007-05-24 11:44 ` Kumar Gala
0 siblings, 1 reply; 7+ messages in thread
From: Li Yang @ 2007-05-24 9:14 UTC (permalink / raw)
To: Paul; +Cc: linuxppc-dev
Export symbols of qe_lib to be used by QE drivers.
Signed-off-by: Li Yang <leoli@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(-)
diff --git a/arch/powerpc/sysdev/qe_lib/ucc.c b/arch/powerpc/sysdev/qe_lib/ucc.c
index ac12a44..e8635aa 100644
--- a/arch/powerpc/sysdev/qe_lib/ucc.c
+++ b/arch/powerpc/sysdev/qe_lib/ucc.c
@@ -18,6 +18,7 @@
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/stddef.h>
+#include <linux/module.h>
#include <asm/irq.h>
#include <asm/io.h>
@@ -40,6 +41,7 @@ int ucc_set_qe_mux_mii_mng(int ucc_num)
return 0;
}
+EXPORT_SYMBOL(ucc_set_qe_mux_mii_mng);
int ucc_set_type(int ucc_num, struct ucc_common *regs,
enum ucc_speed_type speed)
@@ -66,6 +68,7 @@ int ucc_set_type(int ucc_num, struct ucc_common *regs,
return 0;
}
+EXPORT_SYMBOL(ucc_set_type);
int ucc_init_guemr(struct ucc_common *regs)
{
@@ -81,6 +84,7 @@ int ucc_init_guemr(struct ucc_common *regs)
return 0;
}
+EXPORT_SYMBOL(ucc_init_guemr);
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);
int ucc_mux_set_grant_tsa_bkpt(int ucc_num, int set, u32 mask)
{
@@ -142,6 +147,7 @@ int ucc_mux_set_grant_tsa_bkpt(int ucc_num, int set, u32 mask)
return 0;
}
+EXPORT_SYMBOL(ucc_mux_set_grant_tsa_bkpt);
int ucc_set_qe_mux_rxtx(int ucc_num, enum qe_clock clock, enum comm_dir mode)
{
@@ -251,3 +257,4 @@ int ucc_set_qe_mux_rxtx(int ucc_num, enum qe_clock clock, enum comm_dir mode)
return 0;
}
+EXPORT_SYMBOL(ucc_set_qe_mux_rxtx);
diff --git a/arch/powerpc/sysdev/qe_lib/ucc_fast.c b/arch/powerpc/sysdev/qe_lib/ucc_fast.c
index 9143236..3df202e 100644
--- a/arch/powerpc/sysdev/qe_lib/ucc_fast.c
+++ b/arch/powerpc/sysdev/qe_lib/ucc_fast.c
@@ -19,6 +19,7 @@
#include <linux/stddef.h>
#include <linux/interrupt.h>
#include <linux/err.h>
+#include <linux/module.h>
#include <asm/io.h>
#include <asm/immap_qe.h>
@@ -70,6 +71,7 @@ void ucc_fast_dump_regs(struct ucc_fast_private * uccf)
printk(KERN_INFO "guemr : addr - 0x%08x, val - 0x%02x",
(u32) & uccf->uf_regs->guemr, uccf->uf_regs->guemr);
}
+EXPORT_SYMBOL(ucc_fast_dump_regs);
u32 ucc_fast_get_qe_cr_subblock(int uccf_num)
{
@@ -85,11 +87,13 @@ u32 ucc_fast_get_qe_cr_subblock(int uccf_num)
default: return QE_CR_SUBBLOCK_INVALID;
}
}
+EXPORT_SYMBOL(ucc_fast_get_qe_cr_subblock);
void ucc_fast_transmit_on_demand(struct ucc_fast_private * uccf)
{
out_be16(&uccf->uf_regs->utodr, UCC_FAST_TOD);
}
+EXPORT_SYMBOL(ucc_fast_transmit_on_demand);
void ucc_fast_enable(struct ucc_fast_private * uccf, enum comm_dir mode)
{
@@ -110,6 +114,7 @@ void ucc_fast_enable(struct ucc_fast_private * uccf, enum comm_dir mode)
}
out_be32(&uf_regs->gumr, gumr);
}
+EXPORT_SYMBOL(ucc_fast_enable);
void ucc_fast_disable(struct ucc_fast_private * uccf, enum comm_dir mode)
{
@@ -130,6 +135,7 @@ void ucc_fast_disable(struct ucc_fast_private * uccf, enum comm_dir mode)
}
out_be32(&uf_regs->gumr, gumr);
}
+EXPORT_SYMBOL(ucc_fast_disable);
int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** uccf_ret)
{
@@ -341,6 +347,7 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc
*uccf_ret = uccf;
return 0;
}
+EXPORT_SYMBOL(ucc_fast_init);
void ucc_fast_free(struct ucc_fast_private * uccf)
{
@@ -355,3 +362,4 @@ void ucc_fast_free(struct ucc_fast_private * uccf)
kfree(uccf);
}
+EXPORT_SYMBOL(ucc_fast_free);
diff --git a/arch/powerpc/sysdev/qe_lib/ucc_slow.c b/arch/powerpc/sysdev/qe_lib/ucc_slow.c
index 1f65c26..5618275 100644
--- a/arch/powerpc/sysdev/qe_lib/ucc_slow.c
+++ b/arch/powerpc/sysdev/qe_lib/ucc_slow.c
@@ -19,6 +19,7 @@
#include <linux/stddef.h>
#include <linux/interrupt.h>
#include <linux/err.h>
+#include <linux/module.h>
#include <asm/io.h>
#include <asm/immap_qe.h>
@@ -41,11 +42,13 @@ u32 ucc_slow_get_qe_cr_subblock(int uccs_num)
default: return QE_CR_SUBBLOCK_INVALID;
}
}
+EXPORT_SYMBOL(ucc_slow_get_qe_cr_subblock);
void ucc_slow_poll_transmitter_now(struct ucc_slow_private * uccs)
{
out_be16(&uccs->us_regs->utodr, UCC_SLOW_TOD);
}
+EXPORT_SYMBOL(ucc_slow_poll_transmitter_now);
void ucc_slow_graceful_stop_tx(struct ucc_slow_private * uccs)
{
@@ -56,6 +59,7 @@ void ucc_slow_graceful_stop_tx(struct ucc_slow_private * uccs)
qe_issue_cmd(QE_GRACEFUL_STOP_TX, id,
QE_CR_PROTOCOL_UNSPECIFIED, 0);
}
+EXPORT_SYMBOL(ucc_slow_graceful_stop_tx);
void ucc_slow_stop_tx(struct ucc_slow_private * uccs)
{
@@ -65,6 +69,7 @@ void ucc_slow_stop_tx(struct ucc_slow_private * uccs)
id = ucc_slow_get_qe_cr_subblock(us_info->ucc_num);
qe_issue_cmd(QE_STOP_TX, id, QE_CR_PROTOCOL_UNSPECIFIED, 0);
}
+EXPORT_SYMBOL(ucc_slow_stop_tx);
void ucc_slow_restart_tx(struct ucc_slow_private * uccs)
{
@@ -74,6 +79,7 @@ void ucc_slow_restart_tx(struct ucc_slow_private * uccs)
id = ucc_slow_get_qe_cr_subblock(us_info->ucc_num);
qe_issue_cmd(QE_RESTART_TX, id, QE_CR_PROTOCOL_UNSPECIFIED, 0);
}
+EXPORT_SYMBOL(ucc_slow_restart_tx);
void ucc_slow_enable(struct ucc_slow_private * uccs, enum comm_dir mode)
{
@@ -94,6 +100,7 @@ void ucc_slow_enable(struct ucc_slow_private * uccs, enum comm_dir mode)
}
out_be32(&us_regs->gumr_l, gumr_l);
}
+EXPORT_SYMBOL(ucc_slow_enable);
void ucc_slow_disable(struct ucc_slow_private * uccs, enum comm_dir mode)
{
@@ -114,6 +121,7 @@ void ucc_slow_disable(struct ucc_slow_private * uccs, enum comm_dir mode)
}
out_be32(&us_regs->gumr_l, gumr_l);
}
+EXPORT_SYMBOL(ucc_slow_disable);
int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** uccs_ret)
{
@@ -349,6 +357,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
*uccs_ret = uccs;
return 0;
}
+EXPORT_SYMBOL(ucc_slow_init);
void ucc_slow_free(struct ucc_slow_private * uccs)
{
@@ -368,5 +377,4 @@ void ucc_slow_free(struct ucc_slow_private * uccs)
kfree(uccs);
}
-
-
+EXPORT_SYMBOL(ucc_slow_free);
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] qe_lib: export symbols to fix compile error when QE drivers compile as modules
2007-05-24 9:14 [PATCH] qe_lib: export symbols to fix compile error when QE drivers compile as modules Li Yang
@ 2007-05-24 11:44 ` Kumar Gala
2007-05-25 2:45 ` Li Yang-r58472
0 siblings, 1 reply; 7+ messages in thread
From: Kumar Gala @ 2007-05-24 11:44 UTC (permalink / raw)
To: Li Yang; +Cc: linuxppc-dev, Paul
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@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().
> diff --git a/arch/powerpc/sysdev/qe_lib/ucc.c b/arch/powerpc/sysdev/
> qe_lib/ucc.c
> index ac12a44..e8635aa 100644
> --- a/arch/powerpc/sysdev/qe_lib/ucc.c
> +++ b/arch/powerpc/sysdev/qe_lib/ucc.c
> @@ -18,6 +18,7 @@
> #include <linux/errno.h>
> #include <linux/slab.h>
> #include <linux/stddef.h>
> +#include <linux/module.h>
> #include <asm/irq.h>
> #include <asm/io.h>
> @@ -40,6 +41,7 @@ int ucc_set_qe_mux_mii_mng(int ucc_num)
> return 0;
> }
> +EXPORT_SYMBOL(ucc_set_qe_mux_mii_mng);
> int ucc_set_type(int ucc_num, struct ucc_common *regs,
> enum ucc_speed_type speed)
> @@ -66,6 +68,7 @@ int ucc_set_type(int ucc_num, struct ucc_common
> *regs,
> return 0;
> }
> +EXPORT_SYMBOL(ucc_set_type);
remove.
> int ucc_init_guemr(struct ucc_common *regs)
> {
> @@ -81,6 +84,7 @@ int ucc_init_guemr(struct ucc_common *regs)
> return 0;
> }
> +EXPORT_SYMBOL(ucc_init_guemr);
remove.
> 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.
> int ucc_mux_set_grant_tsa_bkpt(int ucc_num, int set, u32 mask)
> {
> @@ -142,6 +147,7 @@ int ucc_mux_set_grant_tsa_bkpt(int ucc_num, int
> set, u32 mask)
> return 0;
> }
> +EXPORT_SYMBOL(ucc_mux_set_grant_tsa_bkpt);
remove
> int ucc_set_qe_mux_rxtx(int ucc_num, enum qe_clock clock, enum
> comm_dir mode)
> {
> @@ -251,3 +257,4 @@ int ucc_set_qe_mux_rxtx(int ucc_num, enum
> qe_clock clock, enum comm_dir mode)
> return 0;
> }
> +EXPORT_SYMBOL(ucc_set_qe_mux_rxtx);
remove.
> diff --git a/arch/powerpc/sysdev/qe_lib/ucc_fast.c b/arch/powerpc/
> sysdev/qe_lib/ucc_fast.c
> index 9143236..3df202e 100644
> --- a/arch/powerpc/sysdev/qe_lib/ucc_fast.c
> +++ b/arch/powerpc/sysdev/qe_lib/ucc_fast.c
> @@ -19,6 +19,7 @@
> #include <linux/stddef.h>
> #include <linux/interrupt.h>
> #include <linux/err.h>
> +#include <linux/module.h>
> #include <asm/io.h>
> #include <asm/immap_qe.h>
> @@ -70,6 +71,7 @@ void ucc_fast_dump_regs(struct ucc_fast_private *
> uccf)
> printk(KERN_INFO "guemr : addr - 0x%08x, val - 0x%02x",
> (u32) & uccf->uf_regs->guemr, uccf->uf_regs->guemr);
> }
> +EXPORT_SYMBOL(ucc_fast_dump_regs);
> u32 ucc_fast_get_qe_cr_subblock(int uccf_num)
> {
> @@ -85,11 +87,13 @@ u32 ucc_fast_get_qe_cr_subblock(int uccf_num)
> default: return QE_CR_SUBBLOCK_INVALID;
> }
> }
> +EXPORT_SYMBOL(ucc_fast_get_qe_cr_subblock);
> void ucc_fast_transmit_on_demand(struct ucc_fast_private * uccf)
> {
> out_be16(&uccf->uf_regs->utodr, UCC_FAST_TOD);
> }
> +EXPORT_SYMBOL(ucc_fast_transmit_on_demand);
> void ucc_fast_enable(struct ucc_fast_private * uccf, enum comm_dir
> mode)
> {
> @@ -110,6 +114,7 @@ void ucc_fast_enable(struct ucc_fast_private *
> uccf, enum comm_dir mode)
> }
> out_be32(&uf_regs->gumr, gumr);
> }
> +EXPORT_SYMBOL(ucc_fast_enable);
> void ucc_fast_disable(struct ucc_fast_private * uccf, enum comm_dir
> mode)
> {
> @@ -130,6 +135,7 @@ void ucc_fast_disable(struct ucc_fast_private *
> uccf, enum comm_dir mode)
> }
> out_be32(&uf_regs->gumr, gumr);
> }
> +EXPORT_SYMBOL(ucc_fast_disable);
> int ucc_fast_init(struct ucc_fast_info * uf_info, struct
> ucc_fast_private ** uccf_ret)
> {
> @@ -341,6 +347,7 @@ int ucc_fast_init(struct ucc_fast_info *
> uf_info, struct ucc_fast_private ** ucc
> *uccf_ret = uccf;
> return 0;
> }
> +EXPORT_SYMBOL(ucc_fast_init);
> void ucc_fast_free(struct ucc_fast_private * uccf)
> {
> @@ -355,3 +362,4 @@ void ucc_fast_free(struct ucc_fast_private * uccf)
> kfree(uccf);
> }
> +EXPORT_SYMBOL(ucc_fast_free);
> diff --git a/arch/powerpc/sysdev/qe_lib/ucc_slow.c b/arch/powerpc/
> sysdev/qe_lib/ucc_slow.c
> index 1f65c26..5618275 100644
> --- a/arch/powerpc/sysdev/qe_lib/ucc_slow.c
> +++ b/arch/powerpc/sysdev/qe_lib/ucc_slow.c
> @@ -19,6 +19,7 @@
> #include <linux/stddef.h>
> #include <linux/interrupt.h>
> #include <linux/err.h>
> +#include <linux/module.h>
> #include <asm/io.h>
> #include <asm/immap_qe.h>
> @@ -41,11 +42,13 @@ u32 ucc_slow_get_qe_cr_subblock(int uccs_num)
> default: return QE_CR_SUBBLOCK_INVALID;
> }
> }
> +EXPORT_SYMBOL(ucc_slow_get_qe_cr_subblock);
remove.
> void ucc_slow_poll_transmitter_now(struct ucc_slow_private * uccs)
> {
> out_be16(&uccs->us_regs->utodr, UCC_SLOW_TOD);
> }
> +EXPORT_SYMBOL(ucc_slow_poll_transmitter_now);
remove.
> void ucc_slow_graceful_stop_tx(struct ucc_slow_private * uccs)
> {
> @@ -56,6 +59,7 @@ void ucc_slow_graceful_stop_tx(struct
> ucc_slow_private * uccs)
> qe_issue_cmd(QE_GRACEFUL_STOP_TX, id,
> QE_CR_PROTOCOL_UNSPECIFIED, 0);
> }
> +EXPORT_SYMBOL(ucc_slow_graceful_stop_tx);
remove.
> void ucc_slow_stop_tx(struct ucc_slow_private * uccs)
> {
> @@ -65,6 +69,7 @@ void ucc_slow_stop_tx(struct ucc_slow_private *
> uccs)
> id = ucc_slow_get_qe_cr_subblock(us_info->ucc_num);
> qe_issue_cmd(QE_STOP_TX, id, QE_CR_PROTOCOL_UNSPECIFIED, 0);
> }
> +EXPORT_SYMBOL(ucc_slow_stop_tx);
remove.
> void ucc_slow_restart_tx(struct ucc_slow_private * uccs)
> {
> @@ -74,6 +79,7 @@ void ucc_slow_restart_tx(struct ucc_slow_private
> * uccs)
> id = ucc_slow_get_qe_cr_subblock(us_info->ucc_num);
> qe_issue_cmd(QE_RESTART_TX, id, QE_CR_PROTOCOL_UNSPECIFIED, 0);
> }
> +EXPORT_SYMBOL(ucc_slow_restart_tx);
remove.
> void ucc_slow_enable(struct ucc_slow_private * uccs, enum comm_dir
> mode)
> {
> @@ -94,6 +100,7 @@ void ucc_slow_enable(struct ucc_slow_private *
> uccs, enum comm_dir mode)
> }
> out_be32(&us_regs->gumr_l, gumr_l);
> }
> +EXPORT_SYMBOL(ucc_slow_enable);
remove.
> void ucc_slow_disable(struct ucc_slow_private * uccs, enum comm_dir
> mode)
> {
> @@ -114,6 +121,7 @@ void ucc_slow_disable(struct ucc_slow_private *
> uccs, enum comm_dir mode)
> }
> out_be32(&us_regs->gumr_l, gumr_l);
> }
> +EXPORT_SYMBOL(ucc_slow_disable);
remove.
> int ucc_slow_init(struct ucc_slow_info * us_info, struct
> ucc_slow_private ** uccs_ret)
> {
> @@ -349,6 +357,7 @@ int ucc_slow_init(struct ucc_slow_info *
> us_info, struct ucc_slow_private ** ucc
> *uccs_ret = uccs;
> return 0;
> }
> +EXPORT_SYMBOL(ucc_slow_init);
remove.
> void ucc_slow_free(struct ucc_slow_private * uccs)
> {
> @@ -368,5 +377,4 @@ void ucc_slow_free(struct ucc_slow_private * uccs)
> kfree(uccs);
> }
> -
> -
> +EXPORT_SYMBOL(ucc_slow_free);
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH] qe_lib: export symbols to fix compile error when QE drivers compile as modules
2007-05-24 11:44 ` Kumar Gala
@ 2007-05-25 2:45 ` Li Yang-r58472
2007-05-25 12:15 ` Kumar Gala
0 siblings, 1 reply; 7+ messages in thread
From: Li Yang-r58472 @ 2007-05-25 2:45 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, Paul
> -----Original Message-----
> From: Kumar Gala [mailto:galak@kernel.crashing.org]
> Sent: Thursday, May 24, 2007 7:44 PM
> To: Li Yang-r58472
> Cc: Paul; linuxppc-dev@ozlabs.org
> Subject: Re: [PATCH] qe_lib: export symbols to fix compile error when
QE drivers
> compile as modules
>=20
>=20
> On May 24, 2007, at 4:14 AM, Li Yang wrote:
>=20
> > Export symbols of qe_lib to be used by QE drivers.
> >
> > Signed-off-by: Li Yang <leoli@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(-)
>=20
> 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?
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.
> > 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);
>=20
> remove, you shouldn't be exporting something marked static.
Good catch.
Thanks,
Leo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] qe_lib: export symbols to fix compile error when QE drivers compile as modules
2007-05-25 2:45 ` Li Yang-r58472
@ 2007-05-25 12:15 ` Kumar Gala
2007-10-17 15:30 ` Kumar Gala
0 siblings, 1 reply; 7+ messages in thread
From: Kumar Gala @ 2007-05-25 12:15 UTC (permalink / raw)
To: Li Yang-r58472; +Cc: linuxppc-dev, Paul
On May 24, 2007, at 9:45 PM, Li Yang-r58472 wrote:
>
>> -----Original Message-----
>> From: Kumar Gala [mailto:galak@kernel.crashing.org]
>> Sent: Thursday, May 24, 2007 7:44 PM
>> To: Li Yang-r58472
>> Cc: Paul; linuxppc-dev@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@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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] qe_lib: export symbols to fix compile error when QE drivers compile as modules
2007-05-25 12:15 ` Kumar Gala
@ 2007-10-17 15:30 ` Kumar Gala
2007-10-19 10:44 ` Li Yang-r58472
0 siblings, 1 reply; 7+ messages in thread
From: Kumar Gala @ 2007-10-17 15:30 UTC (permalink / raw)
To: Li Yang-r58472; +Cc: linuxppc-dev list, Timur Tabi
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@kernel.crashing.org]
>>> Sent: Thursday, May 24, 2007 7:44 PM
>>> To: Li Yang-r58472
>>> Cc: Paul; linuxppc-dev@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@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
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH] qe_lib: export symbols to fix compile error when QE drivers compile as modules
2007-10-17 15:30 ` Kumar Gala
@ 2007-10-19 10:44 ` Li Yang-r58472
2007-10-19 13:05 ` Kumar Gala
0 siblings, 1 reply; 7+ messages in thread
From: Li Yang-r58472 @ 2007-10-19 10:44 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev list, Tabi Timur-B04825
> -----Original Message-----
> From: Kumar Gala [mailto:galak@kernel.crashing.org]=20
> Sent: Wednesday, October 17, 2007 11:30 PM
> To: Li Yang-r58472
> Cc: linuxppc-dev list; Tabi Timur-B04825
> Subject: Re: [PATCH] qe_lib: export symbols to fix compile=20
> error when QE drivers compile as modules
>=20
>=20
> On May 25, 2007, at 7:15 AM, Kumar Gala wrote:
>=20
> >
> > On May 24, 2007, at 9:45 PM, Li Yang-r58472 wrote:
> >
> >>
> >>> -----Original Message-----
> >>> From: Kumar Gala [mailto:galak@kernel.crashing.org]
> >>> Sent: Thursday, May 24, 2007 7:44 PM
> >>> To: Li Yang-r58472
> >>> Cc: Paul; linuxppc-dev@ozlabs.org
> >>> Subject: Re: [PATCH] qe_lib: export symbols to fix compile error=20
> >>> 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@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(-)
> >>>
>=20
> What happened with this?
This has been merged as commit 65482ccf9d00bf4f68e17eb9c656d045d26e5d1f.
- Leo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] qe_lib: export symbols to fix compile error when QE drivers compile as modules
2007-10-19 10:44 ` Li Yang-r58472
@ 2007-10-19 13:05 ` Kumar Gala
0 siblings, 0 replies; 7+ messages in thread
From: Kumar Gala @ 2007-10-19 13:05 UTC (permalink / raw)
To: Li Yang-r58472; +Cc: linuxppc-dev list, Tabi Timur-B04825
>>>>>> Export symbols of qe_lib to be used by QE drivers.
>>>>>>
>>>>>> Signed-off-by: Li Yang <leoli@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(-)
>>>>>
>>
>> What happened with this?
>
> This has been merged as commit
> 65482ccf9d00bf4f68e17eb9c656d045d26e5d1f.
Ignore me I see the commit. Timur will just need to EXPORT_SYMBOL()
what additional functions he needs for the uart driver.
- k
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-10-19 13:05 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-24 9:14 [PATCH] qe_lib: export symbols to fix compile error when QE drivers compile as modules Li Yang
2007-05-24 11:44 ` Kumar Gala
2007-05-25 2:45 ` Li Yang-r58472
2007-05-25 12:15 ` Kumar Gala
2007-10-17 15:30 ` Kumar Gala
2007-10-19 10:44 ` Li Yang-r58472
2007-10-19 13:05 ` Kumar Gala
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).