Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 117699
b: refs/heads/master
c: d777aaf
h: refs/heads/master
i:
  117697: 1d9f7d6
  117695: 5070920
v: v3
  • Loading branch information
Akinobu Mita authored and James Bottomley committed Oct 23, 2008
1 parent f3904af commit 46ec249
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 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: 3ba7f18cd9d974a5b1e75a68a4f0a50f1df8585e
refs/heads/master: d777aaf386ba71d6fbe803c015330a766cad53d8
16 changes: 5 additions & 11 deletions trunk/drivers/scsi/ipr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2456,20 +2456,14 @@ static ssize_t ipr_read_trace(struct kobject *kobj,
struct Scsi_Host *shost = class_to_shost(dev);
struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata;
unsigned long lock_flags = 0;
int size = IPR_TRACE_SIZE;
char *src = (char *)ioa_cfg->trace;

if (off > size)
return 0;
if (off + count > size) {
size -= off;
count = size;
}
ssize_t ret;

spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags);
memcpy(buf, &src[off], count);
ret = memory_read_from_buffer(buf, count, &off, ioa_cfg->trace,
IPR_TRACE_SIZE);
spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
return count;

return ret;
}

static struct bin_attribute ipr_trace_attr = {
Expand Down

0 comments on commit 46ec249

Please sign in to comment.