diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2008-02-23 06:24:57 -0500 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2008-03-13 19:56:58 -0400 |
commit | efbf390a2d940315efff174455243e61f23c03b9 (patch) | |
tree | aac9bf501a8057db0a000538bb85797d2f752788 | |
parent | 25df287dc7434edf8dda10ce85e43f88e834a494 (diff) |
firewire: endianess annotations
Kills warnings from 'make C=1 CHECKFLAGS="-D__CHECK_ENDIAN__" modules':
drivers/firewire/fw-transaction.c:771:10: warning: incorrect type in assignment (different base types)
drivers/firewire/fw-transaction.c:771:10: expected unsigned int [unsigned] [usertype] <noident>
drivers/firewire/fw-transaction.c:771:10: got restricted unsigned int [usertype] <noident>
drivers/firewire/fw-transaction.h:93:10: warning: incorrect type in assignment (different base types)
drivers/firewire/fw-transaction.h:93:10: expected unsigned int [unsigned] [usertype] <noident>
drivers/firewire/fw-transaction.h:93:10: got restricted unsigned int [usertype] <noident>
drivers/firewire/fw-ohci.c:1490:8: warning: restricted degrades to integer
drivers/firewire/fw-ohci.c:1490:35: warning: restricted degrades to integer
drivers/firewire/fw-ohci.c:1516:5: warning: cast to restricted type
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jarod Wilson <jwilson@redhat.com>
-rw-r--r-- | drivers/firewire/fw-ohci.c | 4 | ||||
-rw-r--r-- | drivers/firewire/fw-transaction.c | 2 | ||||
-rw-r--r-- | drivers/firewire/fw-transaction.h | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c index ed4e3573e72c..f9440a760da6 100644 --- a/drivers/firewire/fw-ohci.c +++ b/drivers/firewire/fw-ohci.c | |||
@@ -1487,7 +1487,7 @@ static int handle_ir_dualbuffer_packet(struct context *context, | |||
1487 | void *p, *end; | 1487 | void *p, *end; |
1488 | int i; | 1488 | int i; |
1489 | 1489 | ||
1490 | if (db->first_res_count > 0 && db->second_res_count > 0) { | 1490 | if (db->first_res_count != 0 && db->second_res_count != 0) { |
1491 | if (ctx->excess_bytes <= le16_to_cpu(db->second_req_count)) { | 1491 | if (ctx->excess_bytes <= le16_to_cpu(db->second_req_count)) { |
1492 | /* This descriptor isn't done yet, stop iteration. */ | 1492 | /* This descriptor isn't done yet, stop iteration. */ |
1493 | return 0; | 1493 | return 0; |
@@ -1513,7 +1513,7 @@ static int handle_ir_dualbuffer_packet(struct context *context, | |||
1513 | memcpy(ctx->header + i + 4, p + 8, ctx->base.header_size - 4); | 1513 | memcpy(ctx->header + i + 4, p + 8, ctx->base.header_size - 4); |
1514 | i += ctx->base.header_size; | 1514 | i += ctx->base.header_size; |
1515 | ctx->excess_bytes += | 1515 | ctx->excess_bytes += |
1516 | (le32_to_cpu(*(u32 *)(p + 4)) >> 16) & 0xffff; | 1516 | (le32_to_cpu(*(__le32 *)(p + 4)) >> 16) & 0xffff; |
1517 | p += ctx->base.header_size + 4; | 1517 | p += ctx->base.header_size + 4; |
1518 | } | 1518 | } |
1519 | ctx->header_length = i; | 1519 | ctx->header_length = i; |
diff --git a/drivers/firewire/fw-transaction.c b/drivers/firewire/fw-transaction.c index 7fcc59dedf08..99529e59a0b1 100644 --- a/drivers/firewire/fw-transaction.c +++ b/drivers/firewire/fw-transaction.c | |||
@@ -751,7 +751,7 @@ handle_topology_map(struct fw_card *card, struct fw_request *request, | |||
751 | void *payload, size_t length, void *callback_data) | 751 | void *payload, size_t length, void *callback_data) |
752 | { | 752 | { |
753 | int i, start, end; | 753 | int i, start, end; |
754 | u32 *map; | 754 | __be32 *map; |
755 | 755 | ||
756 | if (!TCODE_IS_READ_REQUEST(tcode)) { | 756 | if (!TCODE_IS_READ_REQUEST(tcode)) { |
757 | fw_send_response(card, request, RCODE_TYPE_ERROR); | 757 | fw_send_response(card, request, RCODE_TYPE_ERROR); |
diff --git a/drivers/firewire/fw-transaction.h b/drivers/firewire/fw-transaction.h index 09cb72870454..a43bb22912f9 100644 --- a/drivers/firewire/fw-transaction.h +++ b/drivers/firewire/fw-transaction.h | |||
@@ -86,12 +86,12 @@ | |||
86 | static inline void | 86 | static inline void |
87 | fw_memcpy_from_be32(void *_dst, void *_src, size_t size) | 87 | fw_memcpy_from_be32(void *_dst, void *_src, size_t size) |
88 | { | 88 | { |
89 | u32 *dst = _dst; | 89 | u32 *dst = _dst; |
90 | u32 *src = _src; | 90 | __be32 *src = _src; |
91 | int i; | 91 | int i; |
92 | 92 | ||
93 | for (i = 0; i < size / 4; i++) | 93 | for (i = 0; i < size / 4; i++) |
94 | dst[i] = cpu_to_be32(src[i]); | 94 | dst[i] = be32_to_cpu(src[i]); |
95 | } | 95 | } |
96 | 96 | ||
97 | static inline void | 97 | static inline void |