lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 16 Oct 2013 19:53:42 -0300
From:	Geyslan Gregório Bem <geyslan@...il.com>
To:	Joe Perches <joe@...ches.com>
Cc:	dmitry.torokhov@...il.com, dudl@...ress.com, kamal@...onical.com,
	mario_limonciello@...l.com, git@...tus.e4ward.com,
	linux-input@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
	kernel-br <kernel-br@...glegroups.com>
Subject: Re: [PATCH v2] drivers: input: mouse: Remove useless casting in cypress_ps2.c

2013/10/16 Joe Perches <joe@...ches.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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ