diff options
author | Joe Carnuccio <joe.carnuccio@qlogic.com> | 2014-09-25 11:16:35 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-09-25 14:25:01 +0200 |
commit | ce9b9b0858c6806ae84072d5fabb5ae0ca3f2799 (patch) | |
tree | 57453e9b03c1a46defba5e055e92c32c5e289d36 /drivers/scsi/qla2xxx/qla_tmpl.c | |
parent | qla2xxx: ISP27xx fwdump template remove high frequency debug logs. (diff) | |
download | linux-ce9b9b0858c6806ae84072d5fabb5ae0ca3f2799.tar.xz linux-ce9b9b0858c6806ae84072d5fabb5ae0ca3f2799.zip |
qla2xxx: ISP27xx fwdump template fix insertbuf() routine.
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_tmpl.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_tmpl.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/scsi/qla2xxx/qla_tmpl.c b/drivers/scsi/qla2xxx/qla_tmpl.c index 6da9dd272eb3..6f2f7b29607d 100644 --- a/drivers/scsi/qla2xxx/qla_tmpl.c +++ b/drivers/scsi/qla2xxx/qla_tmpl.c @@ -128,18 +128,10 @@ qla27xx_insert32(uint32_t value, void *buf, ulong *len) static inline void qla27xx_insertbuf(void *mem, ulong size, void *buf, ulong *len) { - ulong cnt = size; - if (buf && mem) { + if (buf && mem && size) { buf += *len; - while (cnt >= sizeof(uint32_t)) { - *(__le32 *)buf = cpu_to_le32p(mem); - buf += sizeof(uint32_t); - mem += sizeof(uint32_t); - cnt -= sizeof(uint32_t); - } - if (cnt) - memcpy(buf, mem, cnt); + memcpy(buf, mem, size); } *len += size; } |