Skip to contentSkip to conversation

Staging: android: uapi: Fix coding style typedef issue

PATCH In review Sohny Thomas 4 participants 4 messages Jul 1, 2015 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#1 lore raw

PATCH v2 3/3 Staging: android: uapi: Fix coding style typedef issue

In reply to a message not in the archive

As per checkpatch.pl remove unnecessary typedef Here ion_user_handle_t was used only in the header .

---
 drivers/staging/android/uapi/ion.h | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/staging/android/uapi/ion.h +3 -4
index 68a14b4..9897403 100644
@@ -20,7 +20,6 @@
 #include <linux/ioctl.h>
 #include <linux/types.h>
 
-typedef int ion_user_handle_t;
 
 /**
  * enum ion_heap_types - list of all possible types of heaps
@@ -88,7 +87,7 @@ struct ion_allocation_data {
 	size_t align;
 	unsigned int heap_id_mask;
 	unsigned int flags;
-	ion_user_handle_t handle;
+	int handle;
 };
 
 /**
@@ -102,7 +101,7 @@ struct ion_allocation_data {
  * provides the file descriptor and the kernel returns the handle.
  */
 struct ion_fd_data {
-	ion_user_handle_t handle;
+	int handle;
 	int fd;
 };
 
@@ -111,7 +110,7 @@ struct ion_fd_data {
  * @handle:	a handle
  */
 struct ion_handle_data {
-	ion_user_handle_t handle;
+	int handle;
 };
 
 /**
#2 lore raw

Subject suggestion: "staging: android: uapi: remove unnecessary typedef"

That makes it immediately clear what the issue is.

Quoted 5 lines · Sohny Thomas

As per checkpatch.pl remove unnecessary typedef Here ion_user_handle_t was used only in the header .

Typo here as well.

Quoted 9 lines
---
 drivers/staging/android/uapi/ion.h | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/staging/android/uapi/ion.h +0 -0
index 68a14b4..9897403 100644

drivers/staging/android/uapi/ion.h line 23

Quoted 5 lines
drivers/staging/android/uapi/ion.h +0 -1
@@ -20,7 +20,6 @@
 #include <linux/ioctl.h>
 #include <linux/types.h>
 
-typedef int ion_user_handle_t;
 

I would expect an extra line to be removed here. This will leave two empty lines.

Quoted 38 lines
drivers/staging/android/uapi/ion.h +3 -5
 /**
  * enum ion_heap_types - list of all possible types of heaps
@@ -88,7 +87,7 @@ struct ion_allocation_data {
        size_t align;
        unsigned int heap_id_mask;
        unsigned int flags;
-       ion_user_handle_t handle;
+       int handle;
 };
 
 /**
@@ -102,7 +101,7 @@ struct ion_allocation_data {
  * provides the file descriptor and the kernel returns the handle.
  */
 struct ion_fd_data {
-       ion_user_handle_t handle;
+       int handle;
        int fd;
 };
 
@@ -111,7 +110,7 @@ struct ion_fd_data {
  * @handle:    a handle
  */
 struct ion_handle_data {
-       ion_user_handle_t handle;
+       int handle;
 };
 
 /**
--
 
 
 
 
--

To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
In reply to Sohny Thomas
Quoted 5 lines · Sohny Thomas

As per checkpatch.pl remove unnecessary typedef Here ion_user_handle_t was used only in the header .

The original code was correct. Checkpatch.pl is not the king of the world, which you must obey or die. It is just a perl script.

regards,
dan carpenter

#4 lore raw
Quoted 8 lines · Dan Carpenter
Quoted 5 lines · Sohny Thomas

As per checkpatch.pl remove unnecessary typedef Here ion_user_handle_t was used only in the header .

The original code was correct.

because the typedef is exposed to user-space. (uapi)

Quoted 2 lines

Checkpatch.pl is not the king of the
world, which you must obey or die.

As Dan once said, "it's less sentient than a squirrel".

Quoted 1 line

It is just a perl script.

Don't be a squirrel.
Please engage your brain when using the stupid little tool.