From e5ac0190d9fe47cbc9bd18fd1ac576bda6060890 Mon Sep 17 00:00:00 2001 From: Russell King Date: Wed, 25 Aug 2004 22:13:02 +0100 Subject: [PATCH] [ARM] Fix some sparse complaints: Pointers are NULL not 0. Remove obviously unnecessary iBCS2 shm stuff... we're ARM after all. --- arch/arm/common/dmabounce.c | 10 +++++----- 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 7c5d61924a099..5797b1b100a1b 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 5b03e1dd9fffc..7cbd18e95bb01 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); -- 2.53.0