netdev
[Top] [All Lists]

Re: [patch] clean up tcp_sk(), 2.6.0

To: mingo@xxxxxxx
Subject: Re: [patch] clean up tcp_sk(), 2.6.0
From: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@xxxxxxxxxxxxxx>
Date: Wed, 31 Dec 2003 01:50:13 +0900 (JST)
Cc: davem@xxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx, yoshfuji@xxxxxxxxxxxxxx
In-reply-to: <20031230163230.GA12553@xxxxxxx>
Organization: USAGI Project
References: <20031230163230.GA12553@xxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
In article <20031230163230.GA12553@xxxxxxx> (at Tue, 30 Dec 2003 17:32:30 
+0100), Ingo Molnar <mingo@xxxxxxx> says:

> incorrect, compiles just fine on 2.6.0. The patch below is equivalent to
> the define but is also type-safe. Compiles cleanly & boots fine on
> 2.6.0.
:

> -#define tcp_sk(__sk) (&((struct tcp_sock *)__sk)->tcp)
> +static inline struct tcp_opt * tcp_sk(const struct sock *__sk)
> +{
> +     return &((struct tcp_sock *)__sk)->tcp;
> +}
>  

You probably want to convert other similar things such as 
inet_sk(), inet6_sk() etc. :-)

-- 
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@xxxxxxxxxxxxxx>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA

<Prev in Thread] Current Thread [Next in Thread>