Skip to content

Commit

Permalink
IB/iser: Don't change itt endianness
Browse files Browse the repository at this point in the history
The itt field in struct iscsi_data is not defined with any particular
endianness.  open-iscsi should use it as-is without byte-swapping it.
This fixes sparse warnings coming from doing ntohl(hdr->itt).

Signed-off-by: Erez Zilber <erezz@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
  • Loading branch information
Erez Zilber authored and Roland Dreier committed Apr 17, 2008
1 parent 068c4ea commit 0a22ab9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/infiniband/ulp/iser/iser_initiator.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ int iser_send_data_out(struct iscsi_conn *conn,
struct iser_dto *send_dto = NULL;
unsigned long buf_offset;
unsigned long data_seg_len;
unsigned int itt;
uint32_t itt;
int err = 0;

if (!iser_conn_state_comp(iser_conn->ib_conn, ISER_CONN_UP)) {
Expand All @@ -416,7 +416,7 @@ int iser_send_data_out(struct iscsi_conn *conn,
if (iser_check_xmit(conn, ctask))
return -ENOBUFS;

itt = ntohl(hdr->itt);
itt = (__force uint32_t)hdr->itt;
data_seg_len = ntoh24(hdr->dlength);
buf_offset = ntohl(hdr->offset);

Expand Down

0 comments on commit 0a22ab9

Please sign in to comment.