Thread (5 messages) 5 messages, 3 authors, 2014-04-01

Re: [PATCH v2 net-next] net: ptp: oki-semi: fix build dependency

From: Alexei Starovoitov <hidden>
Date: 2014-03-31 20:19:37

On Mon, Mar 31, 2014 at 11:55 AM, Richard Cochran
[off-list ref] wrote:
On Mon, Mar 31, 2014 at 11:02:21AM -0700, Alexei Starovoitov wrote:
quoted
Richard,
thank you for suggestion.
oki-semi depends on ptp, so it's cleaner to move ptp_classify_raw there,
instead of making it unconditionally available in net/core
quoted
Daniel,
timestamping has its own copy of PTP_FILTER, since timestamping
doesn't depend on ptp and I didn't want to add circular dependency,
since some of ptp pieces depend on timestamping, but not the others
We don't really need two copies. As long as you are refactoring this,
why not reduce it to just one filter?

Something like

#if defined(CONFIG_PTP_1588_CLOCK) || defined(CONFIG_NETWORK_PHY_TIMESTAMPING)

... code here ...

#endif

could go into filter.c or somewhere else in the stack.
Agree. two copies are not elegant, but #ifdef like above in filter.c
is even less elegant.
May be do net/core/Makefile:
-obj-$(CONFIG_NETWORK_PHY_TIMESTAMPING) += timestamping.o
+obj-y += timestamping.o
and add above #ifdefs to exclude most of the timestamping.c?
Any other options?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help