Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 281057
b: refs/heads/master
c: b91a936
h: refs/heads/master
i:
  281055: 7b8592d
v: v3
  • Loading branch information
Manohar Vanga authored and Greg Kroah-Hartman committed Nov 27, 2011
1 parent b6b079d commit 6ac9803
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 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: 9638b67ba25b4a008767fca3b6f52d24400a8d1d
refs/heads/master: b91a9363bbdf71324c80bdf0baac09b94c02c52a
13 changes: 7 additions & 6 deletions trunk/drivers/staging/vme/bridges/vme_ca91cx42.c
Original file line number Diff line number Diff line change
Expand Up @@ -876,13 +876,13 @@ static ssize_t ca91cx42_master_read(struct vme_master_resource *image,
* maximal configured data cycle is used and splits it
* automatically for non-aligned addresses.
*/
if ((int)addr & 0x1) {
if ((uintptr_t)addr & 0x1) {
*(u8 *)buf = ioread8(addr);
done += 1;
if (done == count)
goto out;
}
if ((int)addr & 0x2) {
if ((uintptr_t)addr & 0x2) {
if ((count - done) < 2) {
*(u8 *)(buf + done) = ioread8(addr + done);
done += 1;
Expand Down Expand Up @@ -930,13 +930,13 @@ static ssize_t ca91cx42_master_write(struct vme_master_resource *image,
/* Here we apply for the same strategy we do in master_read
* function in order to assure D16 cycle when required.
*/
if ((int)addr & 0x1) {
if ((uintptr_t)addr & 0x1) {
iowrite8(*(u8 *)buf, addr);
done += 1;
if (done == count)
goto out;
}
if ((int)addr & 0x2) {
if ((uintptr_t)addr & 0x2) {
if ((count - done) < 2) {
iowrite8(*(u8 *)(buf + done), addr + done);
done += 1;
Expand Down Expand Up @@ -973,7 +973,8 @@ static unsigned int ca91cx42_master_rmw(struct vme_master_resource *image,
unsigned int mask, unsigned int compare, unsigned int swap,
loff_t offset)
{
u32 pci_addr, result;
u32 result;
uintptr_t pci_addr;
int i;
struct ca91cx42_driver *bridge;
struct device *dev;
Expand All @@ -990,7 +991,7 @@ static unsigned int ca91cx42_master_rmw(struct vme_master_resource *image,
/* Lock image */
spin_lock(&image->lock);

pci_addr = (u32)image->kern_base + offset;
pci_addr = (uintptr_t)image->kern_base + offset;

/* Address must be 4-byte aligned */
if (pci_addr & 0x3) {
Expand Down

0 comments on commit 6ac9803

Please sign in to comment.