Commit 496c98dff8e353880299168d36fa082d6fba5237
Committed by
David S. Miller
1 parent
4244f8a9f8
Exists in
master
and in
7 other branches
[NET]: Use hton{l,s}() for non-initializers.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 2 changed files with 22 additions and 13 deletions Side-by-side Diff
net/ipv4/ip_gre.c
... | ... | @@ -611,8 +611,8 @@ |
611 | 611 | * - When dealing with WCCPv2, Skip extra 4 bytes in GRE header |
612 | 612 | */ |
613 | 613 | if (flags == 0 && |
614 | - skb->protocol == __constant_htons(ETH_P_WCCP)) { | |
615 | - skb->protocol = __constant_htons(ETH_P_IP); | |
614 | + skb->protocol == htons(ETH_P_WCCP)) { | |
615 | + skb->protocol = htons(ETH_P_IP); | |
616 | 616 | if ((*(h + offset) & 0xF0) != 0x40) |
617 | 617 | offset += 4; |
618 | 618 | } |
net/ipv4/tcp_output.c
... | ... | @@ -273,10 +273,10 @@ |
273 | 273 | __u32 tstamp) |
274 | 274 | { |
275 | 275 | if (tp->rx_opt.tstamp_ok) { |
276 | - *ptr++ = __constant_htonl((TCPOPT_NOP << 24) | | |
277 | - (TCPOPT_NOP << 16) | | |
278 | - (TCPOPT_TIMESTAMP << 8) | | |
279 | - TCPOLEN_TIMESTAMP); | |
276 | + *ptr++ = htonl((TCPOPT_NOP << 24) | | |
277 | + (TCPOPT_NOP << 16) | | |
278 | + (TCPOPT_TIMESTAMP << 8) | | |
279 | + TCPOLEN_TIMESTAMP); | |
280 | 280 | *ptr++ = htonl(tstamp); |
281 | 281 | *ptr++ = htonl(tp->rx_opt.ts_recent); |
282 | 282 | } |
283 | 283 | |
284 | 284 | |
285 | 285 | |
... | ... | @@ -325,18 +325,27 @@ |
325 | 325 | *ptr++ = htonl((TCPOPT_MSS << 24) | (TCPOLEN_MSS << 16) | mss); |
326 | 326 | if (ts) { |
327 | 327 | if(sack) |
328 | - *ptr++ = __constant_htonl((TCPOPT_SACK_PERM << 24) | (TCPOLEN_SACK_PERM << 16) | | |
329 | - (TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP); | |
328 | + *ptr++ = htonl((TCPOPT_SACK_PERM << 24) | | |
329 | + (TCPOLEN_SACK_PERM << 16) | | |
330 | + (TCPOPT_TIMESTAMP << 8) | | |
331 | + TCPOLEN_TIMESTAMP); | |
330 | 332 | else |
331 | - *ptr++ = __constant_htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) | | |
332 | - (TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP); | |
333 | + *ptr++ = htonl((TCPOPT_NOP << 24) | | |
334 | + (TCPOPT_NOP << 16) | | |
335 | + (TCPOPT_TIMESTAMP << 8) | | |
336 | + TCPOLEN_TIMESTAMP); | |
333 | 337 | *ptr++ = htonl(tstamp); /* TSVAL */ |
334 | 338 | *ptr++ = htonl(ts_recent); /* TSECR */ |
335 | 339 | } else if(sack) |
336 | - *ptr++ = __constant_htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) | | |
337 | - (TCPOPT_SACK_PERM << 8) | TCPOLEN_SACK_PERM); | |
340 | + *ptr++ = htonl((TCPOPT_NOP << 24) | | |
341 | + (TCPOPT_NOP << 16) | | |
342 | + (TCPOPT_SACK_PERM << 8) | | |
343 | + TCPOLEN_SACK_PERM); | |
338 | 344 | if (offer_wscale) |
339 | - *ptr++ = htonl((TCPOPT_NOP << 24) | (TCPOPT_WINDOW << 16) | (TCPOLEN_WINDOW << 8) | (wscale)); | |
345 | + *ptr++ = htonl((TCPOPT_NOP << 24) | | |
346 | + (TCPOPT_WINDOW << 16) | | |
347 | + (TCPOLEN_WINDOW << 8) | | |
348 | + (wscale)); | |
340 | 349 | } |
341 | 350 | |
342 | 351 | /* This routine actually transmits TCP packets queued in by |