From patchwork Thu Dec 19 23:56:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 22659 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f198.google.com (mail-ie0-f198.google.com [209.85.223.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E1D9023FCA for ; Thu, 19 Dec 2013 23:56:34 +0000 (UTC) Received: by mail-ie0-f198.google.com with SMTP id tp5sf7346956ieb.5 for ; Thu, 19 Dec 2013 15:56:33 -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=mjm6eo5B7V8LD6MtAMpDwXEgXYynk3L1JOcgQRMOgA4=; b=hIzP2ocpLlahQikXDONlfev/6ZWC4FvTyjD+te+k7bMwV2rWXCHY8kan4AaubhKu/h K1/0X4KaDW4oPCo550G+6tVpILyd8SrfMsPw0evAy2A7+f1+5756dk7SVkFvswT7k6e3 g3qy2TOSv+VBZVlKvljSRaeyqi0bVAybj0EieK62wKo6bMZhEsKlVzFEKrXGLIkyZTjt VYWCe45+ydLiAU4hpdXDDC+w4Pbdf3/j1+A7UJAMQeZZneJerpYmRdNCM+UQ3yG2tPNX oNv2+1BoITp54ECrV3Lr4v8cNd4S7VLJFiq+NdFHTEyg0epffo6NnmUzhq372zgjFrBl yr9w== X-Gm-Message-State: ALoCoQlZgwy6wdGMP9PtwKSJuTml/ME8iwExfrVYmaTAnzNe0bc9rlJdux6QyOJFPq4M2SSVpK/C X-Received: by 10.43.128.197 with SMTP id hf5mr1805658icc.2.1387497392685; Thu, 19 Dec 2013 15:56:32 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.71.142 with SMTP id v14ls524929qeu.35.gmail; Thu, 19 Dec 2013 15:56:32 -0800 (PST) X-Received: by 10.53.13.44 with SMTP id ev12mr2584329vdd.17.1387497392543; Thu, 19 Dec 2013 15:56:32 -0800 (PST) Received: from mail-vb0-f49.google.com (mail-vb0-f49.google.com [209.85.212.49]) by mx.google.com with ESMTPS id bq2si1035540vcb.115.2013.12.19.15.56.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 19 Dec 2013 15:56:32 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.49 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.49; Received: by mail-vb0-f49.google.com with SMTP id x11so995578vbb.22 for ; Thu, 19 Dec 2013 15:56:32 -0800 (PST) X-Received: by 10.58.254.200 with SMTP id ak8mr3056329ved.12.1387497392414; Thu, 19 Dec 2013 15:56:32 -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.59.13.131 with SMTP id ey3csp22410ved; Thu, 19 Dec 2013 15:56:31 -0800 (PST) X-Received: by 10.66.192.74 with SMTP id he10mr4889302pac.126.1387497391168; Thu, 19 Dec 2013 15:56:31 -0800 (PST) Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) by mx.google.com with ESMTPS id fu1si3742020pbc.194.2013.12.19.15.56.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 19 Dec 2013 15:56:31 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.52 is neither permitted nor denied by best guess record for domain of john.stultz@linaro.org) client-ip=209.85.220.52; Received: by mail-pa0-f52.google.com with SMTP id ld10so1859851pab.11 for ; Thu, 19 Dec 2013 15:56:30 -0800 (PST) X-Received: by 10.68.66.103 with SMTP id e7mr4857880pbt.120.1387497390698; Thu, 19 Dec 2013 15:56:30 -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 jn12sm9906212pbd.37.2013.12.19.15.56.29 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 19 Dec 2013 15:56:29 -0800 (PST) From: John Stultz To: LKML Cc: John Stultz , Colin Cross , Greg KH , Android Kernel Team Subject: [PATCH] ion_test: Add compat_ioctl support (v2) Date: Thu, 19 Dec 2013 15:56:23 -0800 Message-Id: <1387497383-8321-1-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: References: 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.212.49 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: , Prior to subitting this, Colin reworked the compat_ioctl support for the ion_test driver, moving the structure to be the same size on both 32 and 64 bit architectures. Two small things were left out. The compat_ioctl ptr assignment, and the fact that despite having uniform sized types in the structure, the structure pads out to different sizes on different arches. This patch resolves this issue by adding a padding entry after the write flag, and adding the compat_ioctl ptr. Changes in v2: - Add a padding int rather then making write a u64 Cc: Colin Cross Cc: Greg KH Cc: Android Kernel Team Signed-off-by: John Stultz --- drivers/staging/android/ion/ion_test.c | 1 + drivers/staging/android/uapi/ion_test.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/staging/android/ion/ion_test.c b/drivers/staging/android/ion/ion_test.c index 3e20349..654acb5 100644 --- a/drivers/staging/android/ion/ion_test.c +++ b/drivers/staging/android/ion/ion_test.c @@ -231,6 +231,7 @@ static int ion_test_release(struct inode *inode, struct file *file) static const struct file_operations ion_test_fops = { .owner = THIS_MODULE, .unlocked_ioctl = ion_test_ioctl, + .compat_ioctl = ion_test_ioctl, .open = ion_test_open, .release = ion_test_release, }; diff --git a/drivers/staging/android/uapi/ion_test.h b/drivers/staging/android/uapi/ion_test.h index 614d1e3..ffef06f 100644 --- a/drivers/staging/android/uapi/ion_test.h +++ b/drivers/staging/android/uapi/ion_test.h @@ -32,6 +32,7 @@ struct ion_test_rw_data { __u64 offset; __u64 size; int write; + int __padding; }; #define ION_IOC_MAGIC 'I'