[IRDA]: Trivial annotations.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -91,8 +91,8 @@ struct xid_frame {
|
|||||||
__u8 caddr; /* Connection address */
|
__u8 caddr; /* Connection address */
|
||||||
__u8 control;
|
__u8 control;
|
||||||
__u8 ident; /* Should always be XID_FORMAT */
|
__u8 ident; /* Should always be XID_FORMAT */
|
||||||
__u32 saddr; /* Source device address */
|
__le32 saddr; /* Source device address */
|
||||||
__u32 daddr; /* Destination device address */
|
__le32 daddr; /* Destination device address */
|
||||||
__u8 flags; /* Discovery flags */
|
__u8 flags; /* Discovery flags */
|
||||||
__u8 slotnr;
|
__u8 slotnr;
|
||||||
__u8 version;
|
__u8 version;
|
||||||
@@ -101,15 +101,15 @@ struct xid_frame {
|
|||||||
struct test_frame {
|
struct test_frame {
|
||||||
__u8 caddr; /* Connection address */
|
__u8 caddr; /* Connection address */
|
||||||
__u8 control;
|
__u8 control;
|
||||||
__u32 saddr; /* Source device address */
|
__le32 saddr; /* Source device address */
|
||||||
__u32 daddr; /* Destination device address */
|
__le32 daddr; /* Destination device address */
|
||||||
} IRDA_PACK;
|
} IRDA_PACK;
|
||||||
|
|
||||||
struct ua_frame {
|
struct ua_frame {
|
||||||
__u8 caddr;
|
__u8 caddr;
|
||||||
__u8 control;
|
__u8 control;
|
||||||
__u32 saddr; /* Source device address */
|
__le32 saddr; /* Source device address */
|
||||||
__u32 daddr; /* Dest device address */
|
__le32 daddr; /* Dest device address */
|
||||||
} IRDA_PACK;
|
} IRDA_PACK;
|
||||||
|
|
||||||
struct dm_frame {
|
struct dm_frame {
|
||||||
@@ -135,8 +135,8 @@ struct i_frame {
|
|||||||
struct snrm_frame {
|
struct snrm_frame {
|
||||||
__u8 caddr;
|
__u8 caddr;
|
||||||
__u8 control;
|
__u8 control;
|
||||||
__u32 saddr;
|
__le32 saddr;
|
||||||
__u32 daddr;
|
__le32 daddr;
|
||||||
__u8 ncaddr;
|
__u8 ncaddr;
|
||||||
} IRDA_PACK;
|
} IRDA_PACK;
|
||||||
|
|
||||||
|
@@ -451,12 +451,12 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self,
|
|||||||
n = 2;
|
n = 2;
|
||||||
|
|
||||||
/* Get length, MSB first */
|
/* Get length, MSB first */
|
||||||
len = be16_to_cpu(get_unaligned((__u16 *)(fp+n))); n += 2;
|
len = be16_to_cpu(get_unaligned((__be16 *)(fp+n))); n += 2;
|
||||||
|
|
||||||
IRDA_DEBUG(4, "%s(), len=%d\n", __FUNCTION__, len);
|
IRDA_DEBUG(4, "%s(), len=%d\n", __FUNCTION__, len);
|
||||||
|
|
||||||
/* Get object ID, MSB first */
|
/* Get object ID, MSB first */
|
||||||
obj_id = be16_to_cpu(get_unaligned((__u16 *)(fp+n))); n += 2;
|
obj_id = be16_to_cpu(get_unaligned((__be16 *)(fp+n))); n += 2;
|
||||||
|
|
||||||
type = fp[n++];
|
type = fp[n++];
|
||||||
IRDA_DEBUG(4, "%s(), Value type = %d\n", __FUNCTION__, type);
|
IRDA_DEBUG(4, "%s(), Value type = %d\n", __FUNCTION__, type);
|
||||||
@@ -506,7 +506,7 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self,
|
|||||||
value = irias_new_string_value(fp+n);
|
value = irias_new_string_value(fp+n);
|
||||||
break;
|
break;
|
||||||
case IAS_OCT_SEQ:
|
case IAS_OCT_SEQ:
|
||||||
value_len = be16_to_cpu(get_unaligned((__u16 *)(fp+n)));
|
value_len = be16_to_cpu(get_unaligned((__be16 *)(fp+n)));
|
||||||
n += 2;
|
n += 2;
|
||||||
|
|
||||||
/* Will truncate to IAS_MAX_OCTET_STRING bytes */
|
/* Will truncate to IAS_MAX_OCTET_STRING bytes */
|
||||||
@@ -544,7 +544,7 @@ static void iriap_getvaluebyclass_response(struct iriap_cb *self,
|
|||||||
{
|
{
|
||||||
struct sk_buff *tx_skb;
|
struct sk_buff *tx_skb;
|
||||||
int n;
|
int n;
|
||||||
__u32 tmp_be32;
|
__be32 tmp_be32;
|
||||||
__be16 tmp_be16;
|
__be16 tmp_be16;
|
||||||
__u8 *fp;
|
__u8 *fp;
|
||||||
|
|
||||||
|
@@ -995,7 +995,7 @@ static int __irlan_insert_param(struct sk_buff *skb, char *param, int type,
|
|||||||
{
|
{
|
||||||
__u8 *frame;
|
__u8 *frame;
|
||||||
__u8 param_len;
|
__u8 param_len;
|
||||||
__u16 tmp_le; /* Temporary value in little endian format */
|
__le16 tmp_le; /* Temporary value in little endian format */
|
||||||
int n=0;
|
int n=0;
|
||||||
|
|
||||||
if (skb == NULL) {
|
if (skb == NULL) {
|
||||||
|
@@ -1147,7 +1147,7 @@ int irttp_connect_request(struct tsap_cb *self, __u8 dtsap_sel,
|
|||||||
frame[3] = 0x02; /* Value length */
|
frame[3] = 0x02; /* Value length */
|
||||||
|
|
||||||
put_unaligned(cpu_to_be16((__u16) max_sdu_size),
|
put_unaligned(cpu_to_be16((__u16) max_sdu_size),
|
||||||
(__u16 *)(frame+4));
|
(__be16 *)(frame+4));
|
||||||
} else {
|
} else {
|
||||||
/* Insert plain TTP header */
|
/* Insert plain TTP header */
|
||||||
frame = skb_push(tx_skb, TTP_HEADER);
|
frame = skb_push(tx_skb, TTP_HEADER);
|
||||||
@@ -1394,7 +1394,7 @@ int irttp_connect_response(struct tsap_cb *self, __u32 max_sdu_size,
|
|||||||
frame[3] = 0x02; /* Value length */
|
frame[3] = 0x02; /* Value length */
|
||||||
|
|
||||||
put_unaligned(cpu_to_be16((__u16) max_sdu_size),
|
put_unaligned(cpu_to_be16((__u16) max_sdu_size),
|
||||||
(__u16 *)(frame+4));
|
(__be16 *)(frame+4));
|
||||||
} else {
|
} else {
|
||||||
/* Insert TTP header */
|
/* Insert TTP header */
|
||||||
frame = skb_push(tx_skb, TTP_HEADER);
|
frame = skb_push(tx_skb, TTP_HEADER);
|
||||||
|
Reference in New Issue
Block a user