diff options
| author | Russell King <rmk@flint.arm.linux.org.uk> | 2004-08-25 22:13:02 +0100 |
|---|---|---|
| committer | Russell King <rmk@flint.arm.linux.org.uk> | 2004-08-25 22:13:02 +0100 |
| commit | e5ac0190d9fe47cbc9bd18fd1ac576bda6060890 (patch) | |
| tree | b01328e6df2a744ae54cba32d9a9353514b3604e | |
| parent | 89041f1b7eb15c793e9dac4aa5bec53fbc6cff08 (diff) | |
[ARM] Fix some sparse complaints:
Pointers are NULL not 0.
Remove obviously unnecessary iBCS2 shm stuff... we're ARM after all.
| -rw-r--r-- | arch/arm/common/dmabounce.c | 10 | ||||
| -rw-r--r-- | arch/arm/kernel/sys_arm.c | 7 |
2 files changed, 7 insertions, 10 deletions
diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c index 7c5d61924a09..5797b1b100a1 100644 --- a/arch/arm/common/dmabounce.c +++ b/arch/arm/common/dmabounce.c @@ -121,9 +121,9 @@ alloc_safe_buffer(struct dmabounce_device_info *device_info, void *ptr, DO_STATS ( device_info->total_allocs++ ); buf = kmalloc(sizeof(struct safe_buffer), GFP_ATOMIC); - if (buf == 0) { + if (buf == NULL) { dev_warn(dev, "%s: kmalloc failed\n", __func__); - return 0; + return NULL; } if (size <= device_info->small_buffer_size) { @@ -137,16 +137,16 @@ alloc_safe_buffer(struct dmabounce_device_info *device_info, void *ptr, DO_STATS ( device_info->lbp_allocs++ ); } else { - pool = 0; + pool = NULL; safe = dma_alloc_coherent(dev, size, &safe_dma_addr, GFP_ATOMIC); } - if (safe == 0) { + if (safe == NULL) { dev_warn(device_info->dev, "%s: could not alloc dma memory (size=%d)\n", __func__, size); kfree(buf); - return 0; + return NULL; } #ifdef STATS diff --git a/arch/arm/kernel/sys_arm.c b/arch/arm/kernel/sys_arm.c index 5b03e1dd9fff..7cbd18e95bb0 100644 --- a/arch/arm/kernel/sys_arm.c +++ b/arch/arm/kernel/sys_arm.c @@ -217,11 +217,8 @@ asmlinkage int sys_ipc(uint call, int first, int second, int third, return ret; return put_user(raddr, (ulong __user *)third); } - case 1: /* iBCS2 emulator entry point */ - if (!segment_eq(get_fs(), get_ds())) - return -EINVAL; - return do_shmat(first, (char __user *) ptr, - second, (ulong __user *) third); + case 1: /* Of course, we don't support iBCS2! */ + return -EINVAL; } case SHMDT: return sys_shmdt ((char __user *)ptr); |
