Re: [patch 1/17] Infrastructure to mark exported symbols asunused-for-removal-soon

From: Paul Jackson
Date: Thu May 11 2006 - 02:34:30 EST


Arjan wrote:
> This is patch one in a series of 17; to not overload lkml the other
> 16 will be mailed direct; people who want to see them all can see
> them at http://www.fenrus.org/unused

Well ... here's one case where your patch series is broken.

Argh - I almost missed this one. My mailer is setup to tag all
incoming lkml email that mentions the magic word 'cpuset'. But
it is not setup to catch indirect patches, needless to say.

One of your proposed changes (the only one I reviewed) removed the only
EXPORT_SYMBOL_GPL in kernel/cpuset.c. That EXPORT is needed because
the routine in question is called from inlines which modules use.

I can't help but wonder how many more such cases your patches miss.

The details ...

Your patch includes this change:


+++++++++++++++++++++++ begin +++++++++++++++++++++++
Index: linux-2.6.17-rc3-mm1-unused/kernel/cpuset.c
===================================================================
--- linux-2.6.17-rc3-mm1-unused.orig/kernel/cpuset.c
+++ linux-2.6.17-rc3-mm1-unused/kernel/cpuset.c
@@ -2338,7 +2338,7 @@ int cpuset_mem_spread_node(void)
current->cpuset_mem_spread_rotor = node;
return node;
}
-EXPORT_SYMBOL_GPL(cpuset_mem_spread_node);
+EXPORT_UNUSED_SYMBOL_GPL(cpuset_mem_spread_node); /* removal in 2.6.19 */

/**
* cpuset_excl_nodes_overlap - Do we overlap @p's mem_exclusive ancestors?
++++++++++++++++++++++++ end +++++++++++++++++++++++


Andrew added this EXPORT, with the following patch:


+++++++++++++++++++++++ begin +++++++++++++++++++++++
From: Andrew Morton <akpm@xxxxxxxx>

It's called from inlines which modules use.

Cc: Paul Jackson <pj@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

kernel/cpuset.c | 1 +
1 files changed, 1 insertion(+)

diff -puN kernel/cpuset.c~cpuset-memory-spread-basic-implementation-fix kernel/cpuset.c
--- devel/kernel/cpuset.c~cpuset-memory-spread-basic-implementation-fix 2006-02-06 23:51:0
0.000000000 -0800
+++ devel-akpm/kernel/cpuset.c 2006-02-06 23:51:00.000000000 -0800
@@ -2220,6 +2220,7 @@ int cpuset_mem_spread_node(void)
current->cpuset_mem_spread_rotor = node;
return node;
}
+EXPORT_SYMBOL_GPL(cpuset_mem_spread_node);

/**
* cpuset_excl_nodes_overlap - Do we overlap @p's mem_exclusive ancestors?
++++++++++++++++++++++++ end +++++++++++++++++++++++

--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@xxxxxxx> 1.925.600.0401
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/