From: Hauke Mehrtens <hauke@hauke-m.de>
To: Hin-Tak Leung <hintak.leung@gmail.com>
Cc: lrodriguez@atheros.com, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 2/9] [compat-2.6 and compat-stable] Remove unused code
Date: Tue, 13 Oct 2009 23:12:03 +0200 [thread overview]
Message-ID: <4AD4ED23.7010200@hauke-m.de> (raw)
In-Reply-To: <3ace41890910121932r6f832fe8of70d9b2bdd3d2635@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3374 bytes --]
Hin-Tak Leung wrote:
> On Mon, Oct 12, 2009 at 10:19 PM, Hauke Mehrtens <hauke@hauke-m.de> 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@hauke-m.de>
>> ---
>> 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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 898 bytes --]
next prev parent reply other threads:[~2009-10-13 21:12 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-12 21:19 [PATCH 0/10] [compat-2.6 and compat-stable] Mostly build fixes Hauke Mehrtens
2009-10-12 21:19 ` [PATCH 1/9] [compat-2.6 and compat-stable] Export round_jiffies_up again Hauke Mehrtens
2009-10-13 19:39 ` Luis R. Rodriguez
2009-10-13 20:07 ` Luis R. Rodriguez
2009-10-12 21:19 ` [compat-stable] fix build with recent mainline kernel Hauke Mehrtens
2009-10-12 21:19 ` [PATCH 2/9] [compat-2.6 and compat-stable] Remove unused code Hauke Mehrtens
2009-10-13 2:32 ` Hin-Tak Leung
2009-10-13 21:12 ` Hauke Mehrtens [this message]
2009-10-14 0:12 ` Hin-Tak Leung
2009-10-14 0:18 ` Luis R. Rodriguez
2009-10-14 4:10 ` Greg KH
2009-10-12 21:19 ` [PATCH 3/9] [compat-2.6] Move trace headers Hauke Mehrtens
2009-10-12 21:19 ` [PATCH 4/9] [compat-2.6] Fix compile bug with kernel 2.6.32 Hauke Mehrtens
2009-10-12 21:19 ` [PATCH 5/9] [compat-2.6] Remove temporary fix Hauke Mehrtens
2009-10-12 21:19 ` [PATCH 6/9] [compat-2.6] Fix build with kernel < 2.6.27 Hauke Mehrtens
2009-10-13 19:56 ` Luis R. Rodriguez
2009-10-12 21:19 ` [PATCH 7/9] [compat-2.6] b44 fix Hauke Mehrtens
2009-10-12 21:19 ` [PATCH 8/9] [compat-2.6] refresh patches Hauke Mehrtens
2009-10-12 21:19 ` [PATCH 9/9] [compat-2.6] Add skb_add_rx_frag to backport Hauke Mehrtens
2009-10-13 20:11 ` [PATCH 0/10] [compat-2.6 and compat-stable] Mostly build fixes Luis R. Rodriguez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AD4ED23.7010200@hauke-m.de \
--to=hauke@hauke-m.de \
--cc=hintak.leung@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=lrodriguez@atheros.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).