* [PATCH v2] drivers: input: mouse: Remove useless casting in cypress_ps2.c
@ 2013-10-16 22:31 Geyslan G. Bem
2013-10-16 22:39 ` Joe Perches
2013-10-17 17:19 ` Dmitry Torokhov
0 siblings, 2 replies; 4+ messages in thread
From: Geyslan G. Bem @ 2013-10-16 22:31 UTC (permalink / raw)
To: dmitry.torokhov
Cc: dudl, kamal, mario_limonciello, git, linux-input, linux-kernel,
kernel-br, Geyslan G. Bem
Get rid of unnecessary (void *) casting in 'cypress_init' function.
Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
---
drivers/input/mouse/cypress_ps2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/mouse/cypress_ps2.c b/drivers/input/mouse/cypress_ps2.c
index f51765f..b87d7ba 100644
--- a/drivers/input/mouse/cypress_ps2.c
+++ b/drivers/input/mouse/cypress_ps2.c
@@ -680,7 +680,7 @@ int cypress_init(struct psmouse *psmouse)
struct cytp_data *cytp;
cytp = (struct cytp_data *)kzalloc(sizeof(struct cytp_data), GFP_KERNEL);
- psmouse->private = (void *)cytp;
+ psmouse->private = cytp;
if (cytp == NULL)
return -ENOMEM;
--
1.8.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] drivers: input: mouse: Remove useless casting in cypress_ps2.c
2013-10-16 22:31 [PATCH v2] drivers: input: mouse: Remove useless casting in cypress_ps2.c Geyslan G. Bem
@ 2013-10-16 22:39 ` Joe Perches
2013-10-16 22:53 ` Geyslan Gregório Bem
2013-10-17 17:19 ` Dmitry Torokhov
1 sibling, 1 reply; 4+ messages in thread
From: Joe Perches @ 2013-10-16 22:39 UTC (permalink / raw)
To: Geyslan G. Bem
Cc: dmitry.torokhov, dudl, kamal, mario_limonciello, git, linux-input,
linux-kernel, kernel-br
On Wed, 2013-10-16 at 19:31 -0300, Geyslan G. Bem wrote:
> Get rid of unnecessary (void *) casting in 'cypress_init' function.
[]
> diff --git a/drivers/input/mouse/cypress_ps2.c b/drivers/input/mouse/cypress_ps2.c
[]
> @@ -680,7 +680,7 @@ int cypress_init(struct psmouse *psmouse)
> struct cytp_data *cytp;
>
> cytp = (struct cytp_data *)kzalloc(sizeof(struct cytp_data), GFP_KERNEL);
> - psmouse->private = (void *)cytp;
> + psmouse->private = cytp;
If you are going to remove useless casts, please
also remove the unnecessary kzalloc cast too.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] drivers: input: mouse: Remove useless casting in cypress_ps2.c
2013-10-16 22:39 ` Joe Perches
@ 2013-10-16 22:53 ` Geyslan Gregório Bem
0 siblings, 0 replies; 4+ messages in thread
From: Geyslan Gregório Bem @ 2013-10-16 22:53 UTC (permalink / raw)
To: Joe Perches
Cc: dmitry.torokhov, dudl, kamal, mario_limonciello, git, linux-input,
LKML, kernel-br
2013/10/16 Joe Perches <joe@perches.com>:
> On Wed, 2013-10-16 at 19:31 -0300, Geyslan G. Bem wrote:
>> Get rid of unnecessary (void *) casting in 'cypress_init' function.
> []
>> diff --git a/drivers/input/mouse/cypress_ps2.c b/drivers/input/mouse/cypress_ps2.c
> []
>> @@ -680,7 +680,7 @@ int cypress_init(struct psmouse *psmouse)
>> struct cytp_data *cytp;
>>
>> cytp = (struct cytp_data *)kzalloc(sizeof(struct cytp_data), GFP_KERNEL);
>> - psmouse->private = (void *)cytp;
>> + psmouse->private = cytp;
>
> If you are going to remove useless casts, please
> also remove the unnecessary kzalloc cast too.
>
>
Joe, thanks for reply. Actually I did it and receive this reply from Dmitry:
struct cytp_data *cytp;
- cytp = (struct cytp_data *)kzalloc(sizeof(struct cytp_data), GFP_KERNEL);
+ cytp = kzalloc(sizeof(struct cytp_data), GFP_KERNEL);
I already have a patch for this from Jingoo Han in my queue.
psmouse->private = (void *)cytp;
But this cast is also not needed, so if you could send me a patch for it
I'd appreciate that.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] drivers: input: mouse: Remove useless casting in cypress_ps2.c
2013-10-16 22:31 [PATCH v2] drivers: input: mouse: Remove useless casting in cypress_ps2.c Geyslan G. Bem
2013-10-16 22:39 ` Joe Perches
@ 2013-10-17 17:19 ` Dmitry Torokhov
1 sibling, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2013-10-17 17:19 UTC (permalink / raw)
To: Geyslan G. Bem
Cc: dudl, kamal, mario_limonciello, git, linux-input, linux-kernel,
kernel-br
On Wed, Oct 16, 2013 at 07:31:15PM -0300, Geyslan G. Bem wrote:
> Get rid of unnecessary (void *) casting in 'cypress_init' function.
>
> Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
Applied, thank you.
> ---
> drivers/input/mouse/cypress_ps2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/input/mouse/cypress_ps2.c b/drivers/input/mouse/cypress_ps2.c
> index f51765f..b87d7ba 100644
> --- a/drivers/input/mouse/cypress_ps2.c
> +++ b/drivers/input/mouse/cypress_ps2.c
> @@ -680,7 +680,7 @@ int cypress_init(struct psmouse *psmouse)
> struct cytp_data *cytp;
>
> cytp = (struct cytp_data *)kzalloc(sizeof(struct cytp_data), GFP_KERNEL);
> - psmouse->private = (void *)cytp;
> + psmouse->private = cytp;
> if (cytp == NULL)
> return -ENOMEM;
>
> --
> 1.8.4
>
--
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-10-17 17:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-16 22:31 [PATCH v2] drivers: input: mouse: Remove useless casting in cypress_ps2.c Geyslan G. Bem
2013-10-16 22:39 ` Joe Perches
2013-10-16 22:53 ` Geyslan Gregório Bem
2013-10-17 17:19 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).