The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Serban Constantinescu <serban.constantinescu@arm.com>
To: linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org,
	kernel-team@android.com, arve@android.com,
	john.stultz@linaro.org, Dave.Butcher@arm.com
Cc: Serban Constantinescu <serban.constantinescu@arm.com>
Subject: [PATCH 6/8] staging: android: binder: fix BC_FREE_BUFFER ioctl declaration
Date: Thu,  4 Apr 2013 13:32:36 +0100	[thread overview]
Message-ID: <1365078758-28674-7-git-send-email-serban.constantinescu@arm.com> (raw)
In-Reply-To: <1365078758-28674-1-git-send-email-serban.constantinescu@arm.com>

BinderDriverCommands mirror the ioctl usage. Thus the size of the
structure passed through the interface should be used to generate the
ioctl No.

The change reflects the type being passed from the user space-a pointer
to a binder_buffer. This change should not affect the existing 32bit
user space since BC_FREE_BUFFER is computed as:

   #define _IOW(type,nr,size)         \
      ((type) << _IOC_TYPESHIFT) |    \
      ((nr)   << _IOC_NRSHIFT) |      \
      ((size) << _IOC_SIZESHIFT))

and for a 32bit compiler BC_FREE_BUFFER will have the same computed
value. This change will also ease our work in differentiating
BC_FREE_BUFFER from COMPAT_BC_FREE_BUFFER.

The change does not affect existing 32bit ABI.

Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
---
 drivers/staging/android/binder.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/android/binder.h b/drivers/staging/android/binder.h
index 5b9909f..8789baa 100644
--- a/drivers/staging/android/binder.h
+++ b/drivers/staging/android/binder.h
@@ -265,7 +265,7 @@ enum binder_driver_command_protocol {
 	 * Else you have acquired a primary reference on the object.
 	 */
 
-	BC_FREE_BUFFER = _IOW('c', 3, int),
+	BC_FREE_BUFFER = _IOW('c', 3, void *),
 	/*
 	 * void *: ptr to transaction data received on a read
 	 */
-- 
1.7.9.5


  parent reply	other threads:[~2013-04-04 12:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-04 12:32 [PATCH 0/8] Android Binder IPC Fixes Serban Constantinescu
2013-04-04 12:32 ` [PATCH 1/8] staging: android: binder: replace explicit size types Serban Constantinescu
2013-04-05 23:17   ` Arve Hjønnevåg
2013-04-06  6:00     ` Greg KH
2013-04-08 12:25       ` Serban Constantinescu
2013-04-08 15:20         ` Greg KH
2013-04-04 12:32 ` [PATCH 2/8] staging: android: binder: replace IOCTL types with user-exportable types Serban Constantinescu
2013-04-04 12:32 ` [PATCH 3/8] staging: android: binder: fix binder interface for 64bit compat layer Serban Constantinescu
2013-04-04 12:32 ` [PATCH 4/8] staging: android: binder: fix printk() format specifier Serban Constantinescu
2013-04-06  6:01   ` Greg KH
2013-04-04 12:32 ` [PATCH 5/8] staging: android: binder: fix BINDER_SET_MAX_THREADS declaration Serban Constantinescu
2013-04-04 12:32 ` Serban Constantinescu [this message]
2013-04-04 12:32 ` [PATCH 7/8] staging: android: binder: fix alignment issues Serban Constantinescu
2013-04-04 12:32 ` [PATCH 8/8] staging: android: binder: replace types with portable ones Serban Constantinescu
2013-04-05 22:00 ` [PATCH 0/8] Android Binder IPC Fixes Greg KH
2013-04-05 23:38   ` Arve Hjønnevåg
2013-04-08 13:12     ` Serban Constantinescu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1365078758-28674-7-git-send-email-serban.constantinescu@arm.com \
    --to=serban.constantinescu@arm.com \
    --cc=Dave.Butcher@arm.com \
    --cc=arve@android.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=john.stultz@linaro.org \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox