Skip to content

Commit

Permalink
net: Convert uses of __constant_<foo> to <foo>
Browse files Browse the repository at this point in the history
The use of __constant_<foo> has been unnecessary for quite awhile now.

Make these uses consistent with the rest of the kernel.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Joe Perches authored and David S. Miller committed Mar 12, 2014
1 parent f0e7882 commit 2b8837a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -3495,11 +3495,11 @@ EXPORT_SYMBOL_GPL(netdev_rx_handler_unregister);
static bool skb_pfmemalloc_protocol(struct sk_buff *skb)
{
switch (skb->protocol) {
case __constant_htons(ETH_P_ARP):
case __constant_htons(ETH_P_IP):
case __constant_htons(ETH_P_IPV6):
case __constant_htons(ETH_P_8021Q):
case __constant_htons(ETH_P_8021AD):
case htons(ETH_P_ARP):
case htons(ETH_P_IP):
case htons(ETH_P_IPV6):
case htons(ETH_P_8021Q):
case htons(ETH_P_8021AD):
return true;
default:
return false;
Expand Down
14 changes: 7 additions & 7 deletions net/core/flow_dissector.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ bool skb_flow_dissect(const struct sk_buff *skb, struct flow_keys *flow)

again:
switch (proto) {
case __constant_htons(ETH_P_IP): {
case htons(ETH_P_IP): {
const struct iphdr *iph;
struct iphdr _iph;
ip:
Expand All @@ -77,7 +77,7 @@ bool skb_flow_dissect(const struct sk_buff *skb, struct flow_keys *flow)
iph_to_flow_copy_addrs(flow, iph);
break;
}
case __constant_htons(ETH_P_IPV6): {
case htons(ETH_P_IPV6): {
const struct ipv6hdr *iph;
struct ipv6hdr _iph;
ipv6:
Expand All @@ -91,8 +91,8 @@ bool skb_flow_dissect(const struct sk_buff *skb, struct flow_keys *flow)
nhoff += sizeof(struct ipv6hdr);
break;
}
case __constant_htons(ETH_P_8021AD):
case __constant_htons(ETH_P_8021Q): {
case htons(ETH_P_8021AD):
case htons(ETH_P_8021Q): {
const struct vlan_hdr *vlan;
struct vlan_hdr _vlan;

Expand All @@ -104,7 +104,7 @@ bool skb_flow_dissect(const struct sk_buff *skb, struct flow_keys *flow)
nhoff += sizeof(*vlan);
goto again;
}
case __constant_htons(ETH_P_PPP_SES): {
case htons(ETH_P_PPP_SES): {
struct {
struct pppoe_hdr hdr;
__be16 proto;
Expand All @@ -115,9 +115,9 @@ bool skb_flow_dissect(const struct sk_buff *skb, struct flow_keys *flow)
proto = hdr->proto;
nhoff += PPPOE_SES_HLEN;
switch (proto) {
case __constant_htons(PPP_IP):
case htons(PPP_IP):
goto ip;
case __constant_htons(PPP_IPV6):
case htons(PPP_IPV6):
goto ipv6;
default:
return false;
Expand Down

0 comments on commit 2b8837a

Please sign in to comment.