Thread (4 messages) flat view 4 messages, 2 authors, 2007-01-09

Re: [PATCH 2.6.20-rc3] UCC Ether driver: kmalloc casting cleanups

From: Ahmed S. Darwish <hidden>
Date: 2007-01-08 04:27:32
Also in: lkml

On Mon, Jan 08, 2007 at 11:12:28AM +0800, Li Yang-r58472 wrote:
quoted
From: Ahmed S. Darwish [mailto:darwish.07@gmail.com]

Hi,
A kmalloc casting cleanup patch.
Signed-off-by: Ahmed Darwish <redacted>
[..]
quoted
-				(u32) (kmalloc((u32) (length + align),
-				GFP_KERNEL));
+				kmalloc((u32) (length + align), GFP_KERNEL);
+
 			if (ugeth->tx_bd_ring_offset[j] != 0)
 				ugeth->p_tx_bd_ring[j] =
[..]
quoted
-			    (u32) (kmalloc((u32) (length + align), GFP_KERNEL));
+				kmalloc((u32) (length + align), GFP_KERNEL);
NACK about the 2 clean-ups above.  Cast from pointer to integer is
required here.
Are the casts from pointer to integer just needed to suppress gcc 
warnings or there's something technically important about them ?

I'll send the modified patch without the NACKed parts in minutes ..

-- 
Ahmed S. Darwish
http://darwish-07.blogspot.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help