From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: endian question about struct srp_direct_buf
Date: Thu, 12 Jan 2012 14:41:22 +0300 [thread overview]
Message-ID: <20120112114122.GA29021@elgon.mountain> (raw)
Sparse complains because len in struct srp_direct_buf is declared as
big endian but it's used throughout as CPU endian. struct
srp_indirect_buf has the same thing. It's declared one way but used the
other way.
$ grep -w len drivers/scsi -R | grep -w md
drivers/scsi/ibmvscsi/ibmvfc.c: md[i].len = sg_dma_len(sg);
drivers/scsi/ibmvscsi/ibmvstgt.c: mlen = min(rest, md[i].len);
drivers/scsi/libsrp.c: md->len, scsi_sg_count(sc));
drivers/scsi/libsrp.c: len = min(scsi_bufflen(sc), md->len);
drivers/scsi/libsrp.c: len = md->len;
drivers/scsi/libsrp.c: err = rdma_io(sc, sg, nsg, md, 1, dir, len);
drivers/scsi/libsrp.c: md = dma_alloc_coherent(iue->target->dev, id->table_desc.len,
drivers/scsi/libsrp.c: sg_init_one(&dummy, md, id->table_desc.len);
drivers/scsi/libsrp.c: err = rdma_io(sc, sg, nsg, md, nmd, dir, len);
drivers/scsi/libsrp.c: dma_free_coherent(iue->target->dev, id->table_desc.len, md, token);
drivers/scsi/libsrp.c: len = md->len;
Probably we should just change the declaration to u32?
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2012-01-12 11:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-12 11:41 Dan Carpenter [this message]
[not found] ` <20120112114122.GA29021-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org>
2012-01-12 11:52 ` endian question about struct srp_direct_buf Bart Van Assche
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120112114122.GA29021@elgon.mountain \
--to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.