All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Geyslan Gregório Bem" <geyslan@gmail.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: dudl@cypress.com, kamal@canonical.com,
	mario_limonciello@dell.com, git@status.e4ward.com,
	linux-input@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	kernel-br <kernel-br@googlegroups.com>
Subject: Re: [PATCH] drivers: input: mouse: Remove useless casting in cypress_ps2.c
Date: Wed, 16 Oct 2013 15:48:24 -0300	[thread overview]
Message-ID: <CAGG-pUQFCOh6oCfYdtb4Hfuo5V65+7z5Z6D-rF9-EEw25=whSw@mail.gmail.com> (raw)
In-Reply-To: <20131016184133.GB21932@core.coreip.homeip.net>

2013/10/16 Dmitry Torokhov <dmitry.torokhov@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.

No problem.
>
>>       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.

Sure, I can.
>
>>       if (cytp == NULL)
>>               return -ENOMEM;
>> --
>> 1.8.4
>>
>
> Thanks.
>
> --
> Dmitry

      reply	other threads:[~2013-10-16 18:48 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
2013-10-16 18:48   ` Geyslan Gregório Bem [this message]

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='CAGG-pUQFCOh6oCfYdtb4Hfuo5V65+7z5Z6D-rF9-EEw25=whSw@mail.gmail.com' \
    --to=geyslan@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dudl@cypress.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.