diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-11-20 07:10:51 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-20 07:10:51 -0500 |
commit | c19d0369d4c791d90fe0b84d6040a897fe25cc14 (patch) | |
tree | 403634c996d3f16265f1dc8b9340bab8b068500e /drivers/isdn | |
parent | 13d2a1d2b032de08d7dcab6a1edcd47802681f96 (diff) |
isdn: isdn_net.c annotate struct ip_ports and trivial sparse fixes
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn')
-rw-r--r-- | drivers/isdn/i4l/isdn_net.c | 14 | ||||
-rw-r--r-- | drivers/isdn/i4l/isdn_ppp.c | 12 |
2 files changed, 13 insertions, 13 deletions
diff --git a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c index ad17a47ecc06..4da81c132589 100644 --- a/drivers/isdn/i4l/isdn_net.c +++ b/drivers/isdn/i4l/isdn_net.c | |||
@@ -865,8 +865,8 @@ isdn_net_hangup(struct net_device *d) | |||
865 | } | 865 | } |
866 | 866 | ||
867 | typedef struct { | 867 | typedef struct { |
868 | unsigned short source; | 868 | __be16 source; |
869 | unsigned short dest; | 869 | __be16 dest; |
870 | } ip_ports; | 870 | } ip_ports; |
871 | 871 | ||
872 | static void | 872 | static void |
@@ -1355,7 +1355,7 @@ isdn_net_get_stats(struct net_device *dev) | |||
1355 | * This is normal practice and works for any 'now in use' protocol. | 1355 | * This is normal practice and works for any 'now in use' protocol. |
1356 | */ | 1356 | */ |
1357 | 1357 | ||
1358 | static unsigned short | 1358 | static __be16 |
1359 | isdn_net_type_trans(struct sk_buff *skb, struct net_device *dev) | 1359 | isdn_net_type_trans(struct sk_buff *skb, struct net_device *dev) |
1360 | { | 1360 | { |
1361 | struct ethhdr *eth; | 1361 | struct ethhdr *eth; |
@@ -1817,7 +1817,7 @@ isdn_net_receive(struct net_device *ndev, struct sk_buff *skb) | |||
1817 | /* IP with type field */ | 1817 | /* IP with type field */ |
1818 | olp->huptimer = 0; | 1818 | olp->huptimer = 0; |
1819 | lp->huptimer = 0; | 1819 | lp->huptimer = 0; |
1820 | skb->protocol = *(unsigned short *) &(skb->data[0]); | 1820 | skb->protocol = *(__be16 *)&(skb->data[0]); |
1821 | skb_pull(skb, 2); | 1821 | skb_pull(skb, 2); |
1822 | if (*(unsigned short *) skb->data == 0xFFFF) | 1822 | if (*(unsigned short *) skb->data == 0xFFFF) |
1823 | skb->protocol = htons(ETH_P_802_3); | 1823 | skb->protocol = htons(ETH_P_802_3); |
@@ -1899,12 +1899,12 @@ static int isdn_net_header(struct sk_buff *skb, struct net_device *dev, | |||
1899 | break; | 1899 | break; |
1900 | case ISDN_NET_ENCAP_IPTYP: | 1900 | case ISDN_NET_ENCAP_IPTYP: |
1901 | /* ethernet type field */ | 1901 | /* ethernet type field */ |
1902 | *((ushort *) skb_push(skb, 2)) = htons(type); | 1902 | *((__be16 *)skb_push(skb, 2)) = htons(type); |
1903 | len = 2; | 1903 | len = 2; |
1904 | break; | 1904 | break; |
1905 | case ISDN_NET_ENCAP_UIHDLC: | 1905 | case ISDN_NET_ENCAP_UIHDLC: |
1906 | /* HDLC with UI-Frames (for ispa with -h1 option) */ | 1906 | /* HDLC with UI-Frames (for ispa with -h1 option) */ |
1907 | *((ushort *) skb_push(skb, 2)) = htons(0x0103); | 1907 | *((__be16 *)skb_push(skb, 2)) = htons(0x0103); |
1908 | len = 2; | 1908 | len = 2; |
1909 | break; | 1909 | break; |
1910 | case ISDN_NET_ENCAP_CISCOHDLC: | 1910 | case ISDN_NET_ENCAP_CISCOHDLC: |
@@ -1978,7 +1978,7 @@ static void isdn_header_cache_update(struct hh_cache *hh, | |||
1978 | { | 1978 | { |
1979 | isdn_net_local *lp = dev->priv; | 1979 | isdn_net_local *lp = dev->priv; |
1980 | if (lp->p_encap == ISDN_NET_ENCAP_ETHER) | 1980 | if (lp->p_encap == ISDN_NET_ENCAP_ETHER) |
1981 | return eth_header_cache_update(hh, dev, haddr); | 1981 | eth_header_cache_update(hh, dev, haddr); |
1982 | } | 1982 | } |
1983 | 1983 | ||
1984 | static const struct header_ops isdn_header_ops = { | 1984 | static const struct header_ops isdn_header_ops = { |
diff --git a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c index 77c280ef2eb6..bf5821ef192a 100644 --- a/drivers/isdn/i4l/isdn_ppp.c +++ b/drivers/isdn/i4l/isdn_ppp.c | |||
@@ -1289,10 +1289,10 @@ isdn_ppp_xmit(struct sk_buff *skb, struct net_device *netdev) | |||
1289 | *skb_push(skb, 4) = 1; /* indicate outbound */ | 1289 | *skb_push(skb, 4) = 1; /* indicate outbound */ |
1290 | 1290 | ||
1291 | { | 1291 | { |
1292 | u_int16_t *p = (u_int16_t *) skb->data; | 1292 | __be16 *p = (__be16 *)skb->data; |
1293 | 1293 | ||
1294 | p++; | 1294 | p++; |
1295 | *p = htons(proto); | 1295 | *p = htons(proto); |
1296 | } | 1296 | } |
1297 | 1297 | ||
1298 | if (ipt->pass_filter | 1298 | if (ipt->pass_filter |
@@ -1487,10 +1487,10 @@ int isdn_ppp_autodial_filter(struct sk_buff *skb, isdn_net_local *lp) | |||
1487 | *skb_pull(skb, IPPP_MAX_HEADER - 4) = 1; /* indicate outbound */ | 1487 | *skb_pull(skb, IPPP_MAX_HEADER - 4) = 1; /* indicate outbound */ |
1488 | 1488 | ||
1489 | { | 1489 | { |
1490 | u_int16_t *p = (u_int16_t *) skb->data; | 1490 | __be16 *p = (__be16 *)skb->data; |
1491 | 1491 | ||
1492 | p++; | 1492 | p++; |
1493 | *p = htons(proto); | 1493 | *p = htons(proto); |
1494 | } | 1494 | } |
1495 | 1495 | ||
1496 | drop |= is->pass_filter | 1496 | drop |= is->pass_filter |
@@ -1810,14 +1810,14 @@ static u32 isdn_ppp_mp_get_seq( int short_seq, | |||
1810 | 1810 | ||
1811 | if( !short_seq ) | 1811 | if( !short_seq ) |
1812 | { | 1812 | { |
1813 | seq = ntohl(*(u32*)skb->data) & MP_LONGSEQ_MASK; | 1813 | seq = ntohl(*(__be32 *)skb->data) & MP_LONGSEQ_MASK; |
1814 | skb_push(skb,1); | 1814 | skb_push(skb,1); |
1815 | } | 1815 | } |
1816 | else | 1816 | else |
1817 | { | 1817 | { |
1818 | /* convert 12-bit short seq number to 24-bit long one | 1818 | /* convert 12-bit short seq number to 24-bit long one |
1819 | */ | 1819 | */ |
1820 | seq = ntohs(*(u16*)skb->data) & MP_SHORTSEQ_MASK; | 1820 | seq = ntohs(*(__be16 *)skb->data) & MP_SHORTSEQ_MASK; |
1821 | 1821 | ||
1822 | /* check for seqence wrap */ | 1822 | /* check for seqence wrap */ |
1823 | if( !(seq & MP_SHORTSEQ_MAXBIT) && | 1823 | if( !(seq & MP_SHORTSEQ_MAXBIT) && |