Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217725
b: refs/heads/master
c: 3160977
h: refs/heads/master
i:
  217723: eda78d6
v: v3
  • Loading branch information
Steve Wise authored and Roland Dreier committed Oct 12, 2010
1 parent be44e0d commit 1af3928
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 26 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: 8bbac892fb75d20fa274ca026e24faf00afbf9dd
refs/heads/master: 3160977a6e66ea4c4b4f33010f5d04f0004b938c
26 changes: 1 addition & 25 deletions trunk/drivers/infiniband/hw/cxgb4/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,32 +68,8 @@ static ssize_t debugfs_read(struct file *file, char __user *buf, size_t count,
loff_t *ppos)
{
struct c4iw_debugfs_data *d = file->private_data;
loff_t pos = *ppos;
loff_t avail = d->pos;

if (pos < 0)
return -EINVAL;
if (pos >= avail)
return 0;
if (count > avail - pos)
count = avail - pos;

while (count) {
size_t len = 0;

len = min((int)count, (int)d->pos - (int)pos);
if (copy_to_user(buf, d->buf + pos, len))
return -EFAULT;
if (len == 0)
return -EINVAL;

buf += len;
pos += len;
count -= len;
}
count = pos - *ppos;
*ppos = pos;
return count;
return simple_read_from_buffer(buf, count, ppos, d->buf, d->pos);
}

static int dump_qp(int id, void *p, void *data)
Expand Down

0 comments on commit 1af3928

Please sign in to comment.