Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263289
b: refs/heads/master
c: 6fc6148
h: refs/heads/master
i:
  263287: 8d8b338
v: v3
  • Loading branch information
Julia Lawall authored and Nicholas Bellinger committed Aug 22, 2011
1 parent cfdbbb9 commit 1d0103c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9be08c5804ae4ad96ec22d0b1e71e630803a85ea
refs/heads/master: 6fc6148865c9a17cee33f251723f6a056f022ecd
24 changes: 8 additions & 16 deletions trunk/drivers/target/target_core_rd.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,12 +390,10 @@ static int rd_MEMCPY_read(struct rd_request *req)
length = req->rd_size;

dst = sg_virt(&sg_d[i++]) + dst_offset;
if (!dst)
BUG();
BUG_ON(!dst);

src = sg_virt(&sg_s[j]) + src_offset;
if (!src)
BUG();
BUG_ON(!src);

dst_offset = 0;
src_offset = length;
Expand All @@ -415,8 +413,7 @@ static int rd_MEMCPY_read(struct rd_request *req)
length = req->rd_size;

dst = sg_virt(&sg_d[i]) + dst_offset;
if (!dst)
BUG();
BUG_ON(!dst);

if (sg_d[i].length == length) {
i++;
Expand All @@ -425,8 +422,7 @@ static int rd_MEMCPY_read(struct rd_request *req)
dst_offset = length;

src = sg_virt(&sg_s[j++]) + src_offset;
if (!src)
BUG();
BUG_ON(!src);

src_offset = 0;
page_end = 1;
Expand Down Expand Up @@ -510,12 +506,10 @@ static int rd_MEMCPY_write(struct rd_request *req)
length = req->rd_size;

src = sg_virt(&sg_s[i++]) + src_offset;
if (!src)
BUG();
BUG_ON(!src);

dst = sg_virt(&sg_d[j]) + dst_offset;
if (!dst)
BUG();
BUG_ON(!dst);

src_offset = 0;
dst_offset = length;
Expand All @@ -535,8 +529,7 @@ static int rd_MEMCPY_write(struct rd_request *req)
length = req->rd_size;

src = sg_virt(&sg_s[i]) + src_offset;
if (!src)
BUG();
BUG_ON(!src);

if (sg_s[i].length == length) {
i++;
Expand All @@ -545,8 +538,7 @@ static int rd_MEMCPY_write(struct rd_request *req)
src_offset = length;

dst = sg_virt(&sg_d[j++]) + dst_offset;
if (!dst)
BUG();
BUG_ON(!dst);

dst_offset = 0;
page_end = 1;
Expand Down

0 comments on commit 1d0103c

Please sign in to comment.