diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-12-13 18:03:06 -0500 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2009-01-04 17:50:35 -0500 |
commit | faf26bcc4729546ef95f5edb44f3749bb1b47d1c (patch) | |
tree | 11d012500ef7cd7eda5e27b7703ae64f08daa89e /drivers/ieee1394/eth1394.c | |
parent | debb48063a372525c07561cc96c473ae9adefd99 (diff) |
ieee1394: eth1394: trivial sparse annotations
Mostly annotations of ether_type as a be16.
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/ieee1394/eth1394.c')
-rw-r--r-- | drivers/ieee1394/eth1394.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c index 7ae8bce27569..a074bfd5f825 100644 --- a/drivers/ieee1394/eth1394.c +++ b/drivers/ieee1394/eth1394.c | |||
@@ -92,7 +92,7 @@ struct partial_datagram { | |||
92 | struct list_head list; | 92 | struct list_head list; |
93 | u16 dgl; | 93 | u16 dgl; |
94 | u16 dg_size; | 94 | u16 dg_size; |
95 | u16 ether_type; | 95 | __be16 ether_type; |
96 | struct sk_buff *skb; | 96 | struct sk_buff *skb; |
97 | char *pbuf; | 97 | char *pbuf; |
98 | struct list_head frag_info; | 98 | struct list_head frag_info; |
@@ -767,7 +767,7 @@ static int ether1394_header_parse(const struct sk_buff *skb, | |||
767 | static int ether1394_header_cache(const struct neighbour *neigh, | 767 | static int ether1394_header_cache(const struct neighbour *neigh, |
768 | struct hh_cache *hh) | 768 | struct hh_cache *hh) |
769 | { | 769 | { |
770 | unsigned short type = hh->hh_type; | 770 | __be16 type = hh->hh_type; |
771 | struct net_device *dev = neigh->dev; | 771 | struct net_device *dev = neigh->dev; |
772 | struct eth1394hdr *eth = | 772 | struct eth1394hdr *eth = |
773 | (struct eth1394hdr *)((u8 *)hh->hh_data + 16 - ETH1394_HLEN); | 773 | (struct eth1394hdr *)((u8 *)hh->hh_data + 16 - ETH1394_HLEN); |
@@ -795,7 +795,7 @@ static void ether1394_header_cache_update(struct hh_cache *hh, | |||
795 | ******************************************/ | 795 | ******************************************/ |
796 | 796 | ||
797 | /* Copied from net/ethernet/eth.c */ | 797 | /* Copied from net/ethernet/eth.c */ |
798 | static u16 ether1394_type_trans(struct sk_buff *skb, struct net_device *dev) | 798 | static __be16 ether1394_type_trans(struct sk_buff *skb, struct net_device *dev) |
799 | { | 799 | { |
800 | struct eth1394hdr *eth; | 800 | struct eth1394hdr *eth; |
801 | unsigned char *rawp; | 801 | unsigned char *rawp; |
@@ -829,17 +829,17 @@ static u16 ether1394_type_trans(struct sk_buff *skb, struct net_device *dev) | |||
829 | 829 | ||
830 | /* Parse an encapsulated IP1394 header into an ethernet frame packet. | 830 | /* Parse an encapsulated IP1394 header into an ethernet frame packet. |
831 | * We also perform ARP translation here, if need be. */ | 831 | * We also perform ARP translation here, if need be. */ |
832 | static u16 ether1394_parse_encap(struct sk_buff *skb, struct net_device *dev, | 832 | static __be16 ether1394_parse_encap(struct sk_buff *skb, struct net_device *dev, |
833 | nodeid_t srcid, nodeid_t destid, | 833 | nodeid_t srcid, nodeid_t destid, |
834 | u16 ether_type) | 834 | __be16 ether_type) |
835 | { | 835 | { |
836 | struct eth1394_priv *priv = netdev_priv(dev); | 836 | struct eth1394_priv *priv = netdev_priv(dev); |
837 | u64 dest_hw; | 837 | __be64 dest_hw; |
838 | unsigned short ret = 0; | 838 | __be16 ret = 0; |
839 | 839 | ||
840 | /* Setup our hw addresses. We use these to build the ethernet header. */ | 840 | /* Setup our hw addresses. We use these to build the ethernet header. */ |
841 | if (destid == (LOCAL_BUS | ALL_NODES)) | 841 | if (destid == (LOCAL_BUS | ALL_NODES)) |
842 | dest_hw = ~0ULL; /* broadcast */ | 842 | dest_hw = ~cpu_to_be64(0); /* broadcast */ |
843 | else | 843 | else |
844 | dest_hw = cpu_to_be64((u64)priv->host->csr.guid_hi << 32 | | 844 | dest_hw = cpu_to_be64((u64)priv->host->csr.guid_hi << 32 | |
845 | priv->host->csr.guid_lo); | 845 | priv->host->csr.guid_lo); |
@@ -873,7 +873,7 @@ static u16 ether1394_parse_encap(struct sk_buff *skb, struct net_device *dev, | |||
873 | node = eth1394_find_node_guid(&priv->ip_node_list, | 873 | node = eth1394_find_node_guid(&priv->ip_node_list, |
874 | be64_to_cpu(guid)); | 874 | be64_to_cpu(guid)); |
875 | if (!node) | 875 | if (!node) |
876 | return 0; | 876 | return cpu_to_be16(0); |
877 | 877 | ||
878 | node_info = | 878 | node_info = |
879 | (struct eth1394_node_info *)node->ud->device.driver_data; | 879 | (struct eth1394_node_info *)node->ud->device.driver_data; |
@@ -1063,7 +1063,7 @@ static int ether1394_data_handler(struct net_device *dev, int srcid, int destid, | |||
1063 | unsigned long flags; | 1063 | unsigned long flags; |
1064 | struct eth1394_priv *priv = netdev_priv(dev); | 1064 | struct eth1394_priv *priv = netdev_priv(dev); |
1065 | union eth1394_hdr *hdr = (union eth1394_hdr *)buf; | 1065 | union eth1394_hdr *hdr = (union eth1394_hdr *)buf; |
1066 | u16 ether_type = 0; /* initialized to clear warning */ | 1066 | __be16 ether_type = cpu_to_be16(0); /* initialized to clear warning */ |
1067 | int hdr_len; | 1067 | int hdr_len; |
1068 | struct unit_directory *ud = priv->ud_list[NODEID_TO_NODE(srcid)]; | 1068 | struct unit_directory *ud = priv->ud_list[NODEID_TO_NODE(srcid)]; |
1069 | struct eth1394_node_info *node_info; | 1069 | struct eth1394_node_info *node_info; |
@@ -1259,7 +1259,7 @@ static int ether1394_write(struct hpsb_host *host, int srcid, int destid, | |||
1259 | 1259 | ||
1260 | static void ether1394_iso(struct hpsb_iso *iso) | 1260 | static void ether1394_iso(struct hpsb_iso *iso) |
1261 | { | 1261 | { |
1262 | quadlet_t *data; | 1262 | __be32 *data; |
1263 | char *buf; | 1263 | char *buf; |
1264 | struct eth1394_host_info *hi; | 1264 | struct eth1394_host_info *hi; |
1265 | struct net_device *dev; | 1265 | struct net_device *dev; |
@@ -1283,7 +1283,7 @@ static void ether1394_iso(struct hpsb_iso *iso) | |||
1283 | for (i = 0; i < nready; i++) { | 1283 | for (i = 0; i < nready; i++) { |
1284 | struct hpsb_iso_packet_info *info = | 1284 | struct hpsb_iso_packet_info *info = |
1285 | &iso->infos[(iso->first_packet + i) % iso->buf_packets]; | 1285 | &iso->infos[(iso->first_packet + i) % iso->buf_packets]; |
1286 | data = (quadlet_t *)(iso->data_buf.kvirt + info->offset); | 1286 | data = (__be32 *)(iso->data_buf.kvirt + info->offset); |
1287 | 1287 | ||
1288 | /* skip over GASP header */ | 1288 | /* skip over GASP header */ |
1289 | buf = (char *)data + 8; | 1289 | buf = (char *)data + 8; |
@@ -1614,7 +1614,7 @@ static int ether1394_tx(struct sk_buff *skb, struct net_device *dev) | |||
1614 | if (max_payload < dg_size + hdr_type_len[ETH1394_HDR_LF_UF]) | 1614 | if (max_payload < dg_size + hdr_type_len[ETH1394_HDR_LF_UF]) |
1615 | priv->bc_dgl++; | 1615 | priv->bc_dgl++; |
1616 | } else { | 1616 | } else { |
1617 | __be64 guid = get_unaligned((u64 *)hdr_buf.h_dest); | 1617 | __be64 guid = get_unaligned((__be64 *)hdr_buf.h_dest); |
1618 | 1618 | ||
1619 | node = eth1394_find_node_guid(&priv->ip_node_list, | 1619 | node = eth1394_find_node_guid(&priv->ip_node_list, |
1620 | be64_to_cpu(guid)); | 1620 | be64_to_cpu(guid)); |