Thread (43 messages) 43 messages, 5 authors, 2007-03-05

Re: [PATCH RFC 2/31] net: Implement a place holder network namespace

From: Eric W. Biederman <hidden>
Date: 2007-01-25 20:32:24

Stephen Hemminger [off-list ref] writes:
quoted
+
+#define __per_net_start	((char *)0)
+#define __per_net_end	((char *)0)
Don't use these use NULL
NULL has the wrong data type.  These are compiled out character array
normally generated by the linker script.  I'm not even certain I need
the above but allows for compile time and not link time optimization
so it is probably better that way.  The fact that these happen to be
equal to NULL is their least interesting property.  The fact that
you can subtract the and get 0 is much more interesting.
quoted
+
+static inline int copy_net(int flags, struct task_struct *tsk) { return 0; }
+
+/* Don't let the list of network namespaces change */
+static inline void net_lock(void) {}
+static inline void net_unlock(void) {}
Don't make all one line, or use #define instead.
Why?

Anyway I appreciate the picking of the nits, and it should lead
to better code.

I guess this implies you are in favor of the general idea of
where this is going?

Eric
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help