Hin-Tak Leung wrote: > On Mon, Oct 12, 2009 at 10:19 PM, Hauke Mehrtens <hauke@xxxxxxxxxx> wrote: >> LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28) can not be true in >> compat-2.6.28.h. The definitions are not needed in compat-wireless any >> more. Removing this does not break compiling with mainline kernel 2.6.25 >> to 2.6.32 > > Hmm, I am not questioning your decision for removing unused code, but > if they are genuinely unused, why were they introduced in the first > place? I have added them in edcf845e4bd65d00132f02237bee3fd3daca318f but I can not find any references to them in compat-wireless. For me it looks like it was a mistake to introduce them. The commit comment does not say anything about it (my bad) and I forgot why I added it. > As a side comment, while it is unusual (compared to the usual < > version_X), it is a possible scenario for compat-X.h to have codes > that conditions on LINUX_VERSION_CODE >= version_X - and if memory > serves the bits you are removing were added only recently; and they > looks like what they are (i.e. public kernel symbols became > private-static during 2.6.27<->2.6.28 or the other way round). The condition #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)) was added recently because without it openSuse with kernel 2.6.27 will not compile. OpenSuse backports the tracepoint part into their 2.6.27 kernel. > I guess I am looking for a reason why they were added in the first > place, if they serve no purpose. > >> Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx> >> --- >> compat/compat-2.6.28.h | 24 ------------------------ >> 1 files changed, 0 insertions(+), 24 deletions(-) >> >> diff --git a/compat/compat-2.6.28.h b/compat/compat-2.6.28.h >> index 90d080c..dd223c6 100644 >> --- a/compat/compat-2.6.28.h >> +++ b/compat/compat-2.6.28.h >> @@ -146,22 +146,6 @@ static inline void skb_queue_splice_tail_init(struct sk_buff_head *list, >> } >> } /* From include/linux/skbuff.h */ >> >> -struct module; >> -struct tracepoint; >> - >> -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)) >> -struct tracepoint { >> - const char *name; /* Tracepoint name */ >> - int state; /* State. */ >> - void **funcs; >> -} __attribute__((aligned(32))); /* >> - * Aligned on 32 bytes because it is >> - * globally visible and gcc happily >> - * align these on the structure size. >> - * Keep in sync with vmlinux.lds.h. >> - */ >> -#endif >> - >> #ifndef DECLARE_TRACE >> >> #define TP_PROTO(args...) args >> @@ -181,17 +165,9 @@ struct tracepoint { >> return -ENOSYS; \ >> } >> >> -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)) >> -#define DEFINE_TRACE(name) >> -#endif >> #define EXPORT_TRACEPOINT_SYMBOL_GPL(name) >> #define EXPORT_TRACEPOINT_SYMBOL(name) >> >> -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)) >> -static inline void tracepoint_update_probe_range(struct tracepoint *begin, >> - struct tracepoint *end) >> -{ } >> -#endif >> >> #endif >> >> -- >> 1.6.2.1
Attachment:
signature.asc
Description: OpenPGP digital signature