From patchwork Fri Dec 13 22:24:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 22442 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f69.google.com (mail-yh0-f69.google.com [209.85.213.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 029A923FF5 for ; Fri, 13 Dec 2013 22:28:12 +0000 (UTC) Received: by mail-yh0-f69.google.com with SMTP id a41sf4760899yho.4 for ; Fri, 13 Dec 2013 14:28:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=aV9323JhEUmhh/1sHKQebt6x6ZKKVWUZv7xMgvGkTyE=; b=C1f2qRKZ+FlGyKawEARpnJbiP2QAPeabb/HxOfQdUOmZZusHYpL3N3bgaFV0L0Ehz0 aijJxeK6HZNtGJJIUcj4ErTgydAjkvAm74LXFMYidJYCf7gBNxTQzGz+Qjk0X3Z36bhu 5S+fG5PFKmXm3pIUq3YQtZDS8FT1bE9yJsFXjzvdMGX0OzCcWy+60fa+VINLdQEvxwlQ JqJ6qSJ9UDye4/W9y2+gFMpjhpVxa/E6Exu8XW++Qnet/xrUfoHyeX46Mr0raNfwcdp8 h8/um1V4R90wbJV/Hx46bhsZxxY5PZlWKMWde2anXajqL+y1dlT8d5fw+AbIDY/9aTtQ St0Q== X-Gm-Message-State: ALoCoQkLq+G1pL/0kVJb74MNEFxjpCZgaeTQGw+3Ag/mUpIBPykZWNvDR/elw4O45MaMnEEeAf9D X-Received: by 10.236.90.67 with SMTP id d43mr1681890yhf.36.1386973692837; Fri, 13 Dec 2013 14:28:12 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.29.197 with SMTP id m5ls1172675qeh.43.gmail; Fri, 13 Dec 2013 14:28:12 -0800 (PST) X-Received: by 10.52.253.235 with SMTP id ad11mr1303815vdd.75.1386973692675; Fri, 13 Dec 2013 14:28:12 -0800 (PST) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id td8si1189031vdc.118.2013.12.13.14.28.12 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Dec 2013 14:28:12 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id la4so1742474vcb.15 for ; Fri, 13 Dec 2013 14:28:12 -0800 (PST) X-Received: by 10.220.95.139 with SMTP id d11mr2221459vcn.21.1386973692606; Fri, 13 Dec 2013 14:28:12 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp73608vcz; Fri, 13 Dec 2013 14:28:12 -0800 (PST) X-Received: by 10.68.88.161 with SMTP id bh1mr6022574pbb.49.1386973691774; Fri, 13 Dec 2013 14:28:11 -0800 (PST) Received: from mail-pb0-f43.google.com (mail-pb0-f43.google.com [209.85.160.43]) by mx.google.com with ESMTPS id 8si2487094pbe.280.2013.12.13.14.28.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Dec 2013 14:28:11 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.43 is neither permitted nor denied by best guess record for domain of john.stultz@linaro.org) client-ip=209.85.160.43; Received: by mail-pb0-f43.google.com with SMTP id rq2so3142923pbb.2 for ; Fri, 13 Dec 2013 14:28:11 -0800 (PST) X-Received: by 10.68.25.229 with SMTP id f5mr6255139pbg.6.1386973691391; Fri, 13 Dec 2013 14:28:11 -0800 (PST) Received: from localhost.localdomain (c-67-170-153-23.hsd1.or.comcast.net. [67.170.153.23]) by mx.google.com with ESMTPSA id qz9sm7457908pbc.3.2013.12.13.14.28.10 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Dec 2013 14:28:10 -0800 (PST) From: John Stultz To: LKML Cc: Greg KH , Android Kernel Team , Sumit Semwal , Jesse Barker , Colin Cross , Rom Lemarchand , John Stultz Subject: [PATCH 080/115] ion: change ion_user_handle_t definition to int Date: Fri, 13 Dec 2013 14:24:54 -0800 Message-Id: <1386973529-4884-81-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1386973529-4884-1-git-send-email-john.stultz@linaro.org> References: <1386973529-4884-1-git-send-email-john.stultz@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: john.stultz@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Rom Lemarchand Turn ion_user_handle_t to int. This change reflects the underlying type returned by the ion driver. Signed-off-by: Rom Lemarchand [jstultz: modified patch to apply to staging directory] Signed-off-by: John Stultz --- drivers/staging/android/ion/ion.c | 8 ++++---- drivers/staging/android/ion/ion.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index e2a3033..1c40b74 100644 --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/ion/ion.c @@ -1139,7 +1139,7 @@ static long ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) if (IS_ERR(handle)) return PTR_ERR(handle); - data.handle = (ion_user_handle_t)handle->id; + data.handle = handle->id; if (copy_to_user((void __user *)arg, &data, sizeof(data))) { ion_free(client, handle); @@ -1156,7 +1156,7 @@ static long ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) sizeof(struct ion_handle_data))) return -EFAULT; mutex_lock(&client->lock); - handle = ion_uhandle_get(client, (int)data.handle); + handle = ion_uhandle_get(client, data.handle); mutex_unlock(&client->lock); if (!handle) return -EINVAL; @@ -1171,7 +1171,7 @@ static long ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) if (copy_from_user(&data, (void __user *)arg, sizeof(data))) return -EFAULT; - handle = ion_uhandle_get(client, (int)data.handle); + handle = ion_uhandle_get(client, data.handle); data.fd = ion_share_dma_buf_fd(client, handle); if (copy_to_user((void __user *)arg, &data, sizeof(data))) return -EFAULT; @@ -1191,7 +1191,7 @@ static long ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) if (IS_ERR(handle)) ret = PTR_ERR(handle); else - data.handle = (ion_user_handle_t)handle->id; + data.handle = handle->id; if (copy_to_user((void __user *)arg, &data, sizeof(struct ion_fd_data))) diff --git a/drivers/staging/android/ion/ion.h b/drivers/staging/android/ion/ion.h index 244f085..d979890 100644 --- a/drivers/staging/android/ion/ion.h +++ b/drivers/staging/android/ion/ion.h @@ -19,8 +19,7 @@ #include -struct ion_handle; -typedef struct ion_handle *ion_user_handle_t; +typedef int ion_user_handle_t; /** * enum ion_heap_types - list of all possible types of heaps @@ -65,6 +64,7 @@ enum ion_heap_type { caches must be managed manually */ #ifdef __KERNEL__ +struct ion_handle; struct ion_device; struct ion_heap; struct ion_mapper;