Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 129852
b: refs/heads/master
c: 4c33d2d
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Rothwell authored and Benjamin Herrenschmidt committed Jan 16, 2009
1 parent 1322946 commit 20699b4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 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: e377c6e24d1b465ebd18fe49d0dc06932ced9bb0
refs/heads/master: 4c33d2dc34f50e5d5436e62cd99395859f157a19
18 changes: 9 additions & 9 deletions trunk/drivers/char/ps3flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ static ssize_t ps3flash_read_write_sectors(struct ps3_storage_device *dev,
u64 res = ps3stor_read_write_sectors(dev, lpar, start_sector, sectors,
write);
if (res) {
dev_err(&dev->sbd.core, "%s:%u: %s failed 0x%lx\n", __func__,
dev_err(&dev->sbd.core, "%s:%u: %s failed 0x%llx\n", __func__,
__LINE__, write ? "write" : "read", res);
return -EIO;
}
Expand All @@ -59,7 +59,7 @@ static ssize_t ps3flash_read_sectors(struct ps3_storage_device *dev,

max_sectors = dev->bounce_size / dev->blk_size;
if (sectors > max_sectors) {
dev_dbg(&dev->sbd.core, "%s:%u Limiting sectors to %lu\n",
dev_dbg(&dev->sbd.core, "%s:%u Limiting sectors to %llu\n",
__func__, __LINE__, max_sectors);
sectors = max_sectors;
}
Expand Down Expand Up @@ -144,7 +144,7 @@ static ssize_t ps3flash_read(struct file *file, char __user *buf, size_t count,
goto fail;
}

n = min(remaining, sectors_read*dev->blk_size-offset);
n = min_t(u64, remaining, sectors_read*dev->blk_size-offset);
dev_dbg(&dev->sbd.core,
"%s:%u: copy %lu bytes from 0x%p to user 0x%p\n",
__func__, __LINE__, n, dev->bounce_buf+offset, buf);
Expand Down Expand Up @@ -225,7 +225,7 @@ static ssize_t ps3flash_write(struct file *file, const char __user *buf,
if (end_read_sector >= start_read_sector) {
/* Merge head and tail */
dev_dbg(&dev->sbd.core,
"Merged head and tail: %lu sectors at %lu\n",
"Merged head and tail: %llu sectors at %llu\n",
chunk_sectors, start_write_sector);
res = ps3flash_read_sectors(dev, start_write_sector,
chunk_sectors, 0);
Expand All @@ -235,7 +235,7 @@ static ssize_t ps3flash_write(struct file *file, const char __user *buf,
if (head) {
/* Read head */
dev_dbg(&dev->sbd.core,
"head: %lu sectors at %lu\n", head,
"head: %llu sectors at %llu\n", head,
start_write_sector);
res = ps3flash_read_sectors(dev,
start_write_sector,
Expand All @@ -247,7 +247,7 @@ static ssize_t ps3flash_write(struct file *file, const char __user *buf,
start_write_sector+chunk_sectors) {
/* Read tail */
dev_dbg(&dev->sbd.core,
"tail: %lu sectors at %lu\n", tail,
"tail: %llu sectors at %llu\n", tail,
start_read_sector);
sec_off = start_read_sector-start_write_sector;
res = ps3flash_read_sectors(dev,
Expand All @@ -258,7 +258,7 @@ static ssize_t ps3flash_write(struct file *file, const char __user *buf,
}
}

n = min(remaining, dev->bounce_size-offset);
n = min_t(u64, remaining, dev->bounce_size-offset);
dev_dbg(&dev->sbd.core,
"%s:%u: copy %lu bytes from user 0x%p to 0x%p\n",
__func__, __LINE__, n, buf, dev->bounce_buf+offset);
Expand Down Expand Up @@ -299,11 +299,11 @@ static irqreturn_t ps3flash_interrupt(int irq, void *data)

if (tag != dev->tag)
dev_err(&dev->sbd.core,
"%s:%u: tag mismatch, got %lx, expected %lx\n",
"%s:%u: tag mismatch, got %llx, expected %llx\n",
__func__, __LINE__, tag, dev->tag);

if (res) {
dev_err(&dev->sbd.core, "%s:%u: res=%d status=0x%lx\n",
dev_err(&dev->sbd.core, "%s:%u: res=%d status=0x%llx\n",
__func__, __LINE__, res, status);
} else {
dev->lv1_status = status;
Expand Down

0 comments on commit 20699b4

Please sign in to comment.