Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[IRDA]: Trivial annotations.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Al Viro and committed by
David S. Miller
448c31aa c68b9070

+15 -15
+8 -8
include/net/irda/irlap_frame.h
··· 91 91 __u8 caddr; /* Connection address */ 92 92 __u8 control; 93 93 __u8 ident; /* Should always be XID_FORMAT */ 94 - __u32 saddr; /* Source device address */ 95 - __u32 daddr; /* Destination device address */ 94 + __le32 saddr; /* Source device address */ 95 + __le32 daddr; /* Destination device address */ 96 96 __u8 flags; /* Discovery flags */ 97 97 __u8 slotnr; 98 98 __u8 version; ··· 101 101 struct test_frame { 102 102 __u8 caddr; /* Connection address */ 103 103 __u8 control; 104 - __u32 saddr; /* Source device address */ 105 - __u32 daddr; /* Destination device address */ 104 + __le32 saddr; /* Source device address */ 105 + __le32 daddr; /* Destination device address */ 106 106 } IRDA_PACK; 107 107 108 108 struct ua_frame { 109 109 __u8 caddr; 110 110 __u8 control; 111 - __u32 saddr; /* Source device address */ 112 - __u32 daddr; /* Dest device address */ 111 + __le32 saddr; /* Source device address */ 112 + __le32 daddr; /* Dest device address */ 113 113 } IRDA_PACK; 114 114 115 115 struct dm_frame { ··· 135 135 struct snrm_frame { 136 136 __u8 caddr; 137 137 __u8 control; 138 - __u32 saddr; 139 - __u32 daddr; 138 + __le32 saddr; 139 + __le32 daddr; 140 140 __u8 ncaddr; 141 141 } IRDA_PACK; 142 142
+4 -4
net/irda/iriap.c
··· 451 451 n = 2; 452 452 453 453 /* Get length, MSB first */ 454 - len = be16_to_cpu(get_unaligned((__u16 *)(fp+n))); n += 2; 454 + len = be16_to_cpu(get_unaligned((__be16 *)(fp+n))); n += 2; 455 455 456 456 IRDA_DEBUG(4, "%s(), len=%d\n", __FUNCTION__, len); 457 457 458 458 /* Get object ID, MSB first */ 459 - obj_id = be16_to_cpu(get_unaligned((__u16 *)(fp+n))); n += 2; 459 + obj_id = be16_to_cpu(get_unaligned((__be16 *)(fp+n))); n += 2; 460 460 461 461 type = fp[n++]; 462 462 IRDA_DEBUG(4, "%s(), Value type = %d\n", __FUNCTION__, type); ··· 506 506 value = irias_new_string_value(fp+n); 507 507 break; 508 508 case IAS_OCT_SEQ: 509 - value_len = be16_to_cpu(get_unaligned((__u16 *)(fp+n))); 509 + value_len = be16_to_cpu(get_unaligned((__be16 *)(fp+n))); 510 510 n += 2; 511 511 512 512 /* Will truncate to IAS_MAX_OCTET_STRING bytes */ ··· 544 544 { 545 545 struct sk_buff *tx_skb; 546 546 int n; 547 - __u32 tmp_be32; 547 + __be32 tmp_be32; 548 548 __be16 tmp_be16; 549 549 __u8 *fp; 550 550
+1 -1
net/irda/irlan/irlan_common.c
··· 995 995 { 996 996 __u8 *frame; 997 997 __u8 param_len; 998 - __u16 tmp_le; /* Temporary value in little endian format */ 998 + __le16 tmp_le; /* Temporary value in little endian format */ 999 999 int n=0; 1000 1000 1001 1001 if (skb == NULL) {
+2 -2
net/irda/irttp.c
··· 1147 1147 frame[3] = 0x02; /* Value length */ 1148 1148 1149 1149 put_unaligned(cpu_to_be16((__u16) max_sdu_size), 1150 - (__u16 *)(frame+4)); 1150 + (__be16 *)(frame+4)); 1151 1151 } else { 1152 1152 /* Insert plain TTP header */ 1153 1153 frame = skb_push(tx_skb, TTP_HEADER); ··· 1394 1394 frame[3] = 0x02; /* Value length */ 1395 1395 1396 1396 put_unaligned(cpu_to_be16((__u16) max_sdu_size), 1397 - (__u16 *)(frame+4)); 1397 + (__be16 *)(frame+4)); 1398 1398 } else { 1399 1399 /* Insert TTP header */ 1400 1400 frame = skb_push(tx_skb, TTP_HEADER);