From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: "Geyslan G. Bem" <geyslan@gmail.com>
Cc: dudl@cypress.com, kamal@canonical.com,
mario_limonciello@dell.com, git@status.e4ward.com,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-br@googlegroups.com
Subject: Re: [PATCH] drivers: input: mouse: Remove useless casting in cypress_ps2.c
Date: Wed, 16 Oct 2013 11:41:34 -0700 [thread overview]
Message-ID: <20131016184133.GB21932@core.coreip.homeip.net> (raw)
In-Reply-To: <1381939512-28534-1-git-send-email-geyslan@gmail.com>
Hi Geyslan,
On Wed, Oct 16, 2013 at 01:05:12PM -0300, Geyslan G. Bem wrote:
> Casting (void *) value returned by kzalloc is useless
> as mentioned in Documentation/CodingStyle, Chap 14.
>
> 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..ef651cc 100644
> --- a/drivers/input/mouse/cypress_ps2.c
> +++ b/drivers/input/mouse/cypress_ps2.c
> @@ -679,7 +679,7 @@ int cypress_init(struct psmouse *psmouse)
> {
> 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.
> if (cytp == NULL)
> return -ENOMEM;
> --
> 1.8.4
>
Thanks.
--
Dmitry
next prev parent reply other threads:[~2013-10-16 18:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-16 16:05 [PATCH] drivers: input: mouse: Remove useless casting in cypress_ps2.c Geyslan G. Bem
2013-10-16 18:41 ` Dmitry Torokhov [this message]
2013-10-16 18:48 ` Geyslan Gregório Bem
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=20131016184133.GB21932@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=dudl@cypress.com \
--cc=geyslan@gmail.com \
--cc=git@status.e4ward.com \
--cc=kamal@canonical.com \
--cc=kernel-br@googlegroups.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mario_limonciello@dell.com \
/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