* [PATCH v2 3/3] Staging: android: uapi: Fix coding style typedef issue
[not found] <5593EDBF.6010008@zoho.com>
@ 2015-07-01 13:47 ` Sohny Thomas
2015-07-01 14:21 ` Frans Klaver
2015-07-01 14:31 ` Dan Carpenter
0 siblings, 2 replies; 4+ messages in thread
From: Sohny Thomas @ 2015-07-01 13:47 UTC (permalink / raw)
To: gregkh, arve, riandrews, sumit.semwal, carlos
Cc: linux-kernel@vger.kernel.org, kernel-janitors
As per checkpatch.pl remove unnecessary typedef
Here ion_user_handle_t was used only in the header .
Signed-of-by: Sohny Thomas <sohnythomas@zoho.com>
---
drivers/staging/android/uapi/ion.h | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/android/uapi/ion.h b/drivers/staging/android/uapi/ion.h
index 68a14b4..9897403 100644
--- a/drivers/staging/android/uapi/ion.h
+++ b/drivers/staging/android/uapi/ion.h
@@ -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;
};
/**
--
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 3/3] Staging: android: uapi: Fix coding style typedef issue
2015-07-01 13:47 ` [PATCH v2 3/3] Staging: android: uapi: Fix coding style typedef issue Sohny Thomas
@ 2015-07-01 14:21 ` Frans Klaver
2015-07-01 14:31 ` Dan Carpenter
1 sibling, 0 replies; 4+ messages in thread
From: Frans Klaver @ 2015-07-01 14:21 UTC (permalink / raw)
To: Sohny Thomas
Cc: Greg KH, arve, riandrews, Sumit Semwal, carlos,
linux-kernel@vger.kernel.org, kernel-janitors
Subject suggestion: "staging: android: uapi: remove unnecessary typedef"
That makes it immediately clear what the issue is.
On Wed, Jul 1, 2015 at 3:47 PM, Sohny Thomas <sohnythomas@zoho.com> wrote:
>
> As per checkpatch.pl remove unnecessary typedef
> Here ion_user_handle_t was used only in the header .
>
> Signed-of-by: Sohny Thomas <sohnythomas@zoho.com>
Typo here as well.
> ---
> drivers/staging/android/uapi/ion.h | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/android/uapi/ion.h b/drivers/staging/android/uapi/ion.h
> index 68a14b4..9897403 100644
> --- a/drivers/staging/android/uapi/ion.h
> +++ b/drivers/staging/android/uapi/ion.h
> @@ -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.
> /**
> * 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 majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 3/3] Staging: android: uapi: Fix coding style typedef issue
2015-07-01 13:47 ` [PATCH v2 3/3] Staging: android: uapi: Fix coding style typedef issue Sohny Thomas
2015-07-01 14:21 ` Frans Klaver
@ 2015-07-01 14:31 ` Dan Carpenter
2015-07-01 15:08 ` Joe Perches
1 sibling, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2015-07-01 14:31 UTC (permalink / raw)
To: Sohny Thomas
Cc: gregkh, arve, riandrews, sumit.semwal, carlos,
linux-kernel@vger.kernel.org, kernel-janitors
On Wed, Jul 01, 2015 at 07:17:58PM +0530, Sohny Thomas wrote:
>
> As per checkpatch.pl remove unnecessary typedef
> Here ion_user_handle_t was used only in the header .
>
> Signed-of-by: Sohny Thomas <sohnythomas@zoho.com>
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 3/3] Staging: android: uapi: Fix coding style typedef issue
2015-07-01 14:31 ` Dan Carpenter
@ 2015-07-01 15:08 ` Joe Perches
0 siblings, 0 replies; 4+ messages in thread
From: Joe Perches @ 2015-07-01 15:08 UTC (permalink / raw)
To: Dan Carpenter
Cc: Sohny Thomas, gregkh, arve, riandrews, sumit.semwal, carlos,
linux-kernel@vger.kernel.org, kernel-janitors
On Wed, 2015-07-01 at 17:31 +0300, Dan Carpenter wrote:
> On Wed, Jul 01, 2015 at 07:17:58PM +0530, Sohny Thomas wrote:
> >
> > As per checkpatch.pl remove unnecessary typedef
> > Here ion_user_handle_t was used only in the header .
> >
> > Signed-of-by: Sohny Thomas <sohnythomas@zoho.com>
>
> The original code was correct.
because the typedef is exposed to user-space. (uapi)
> 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".
> It is just a perl script.
Don't be a squirrel.
Please engage your brain when using the stupid little tool.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-07-01 15:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <5593EDBF.6010008@zoho.com>
2015-07-01 13:47 ` [PATCH v2 3/3] Staging: android: uapi: Fix coding style typedef issue Sohny Thomas
2015-07-01 14:21 ` Frans Klaver
2015-07-01 14:31 ` Dan Carpenter
2015-07-01 15:08 ` Joe Perches
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox