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]
Message-ID: <4B51DD22.4040404@s5r6.in-berlin.de>
Date:	Sat, 16 Jan 2010 16:37:06 +0100
From:	Stefan Richter <stefanr@...6.in-berlin.de>
To:	Thiago Farina <tfransosi@...il.com>
CC:	linux-kernel@...r.kernel.org, Willem Riede <osst@...de.org>,
	"James E.J. Bottomley" <James.Bottomley@...e.de>,
	James Bottomley <James.Bottomley@...senPartnership.com>,
	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>,
	osst-users@...ts.sourceforge.net, linux-scsi@...r.kernel.org
Subject: Re: [PATCH] scsi/osst.c: remove unncessary casting of kmalloc.

Stefan Richter wrote:
> Thiago Farina wrote:
>> -		os_scsi_tapes =
>> -			(struct osst_tape **)kmalloc(osst_max_dev * sizeof(struct osst_tape *),
>> -				   GFP_ATOMIC);
>> +		os_scsi_tapes = kmalloc(osst_max_dev * sizeof(struct osst_tape *),
>> +					GFP_ATOMIC);

> Since you update the style of this kmalloc usage, you could at the same
> time change the sizeof expression to sizeof(* os_scsi_tapes).

PS: osst_max_dev * sizeof(* os_scsi_tapes) of course, if it wasn't obvious.
-- 
Stefan Richter
-=====-==-=- ---= =----
http://arcgraph.de/sr/
--
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