RE: [PATCH 2.6.20-rc3] UCC Ether driver: kmalloc casting cleanups
From: Li Yang-r58472 <hidden>
Date: 2007-01-08 07:27:15
Also in:
lkml
-----Original Message----- From: Ahmed S. Darwish [mailto:darwish.07@gmail.com] Sent: Monday, January 08, 2007 12:27 PM To: Li Yang-r58472 Cc: linux-kernel@vger.kernel.org; netdev@vger.kernel.org Subject: Re: [PATCH 2.6.20-rc3] UCC Ether driver: kmalloc casting
cleanups
On Mon, Jan 08, 2007 at 11:12:28AM +0800, Li Yang-r58472 wrote:quoted
quoted
From: Ahmed S. Darwish [mailto:darwish.07@gmail.com] Hi, A kmalloc casting cleanup patch. Signed-off-by: Ahmed Darwish <redacted>[..]quoted
quoted
- (u32) (kmalloc((u32) (length + align), - GFP_KERNEL)); + kmalloc((u32) (length + align),
GFP_KERNEL);
quoted
quoted
+ if (ugeth->tx_bd_ring_offset[j] != 0) ugeth->p_tx_bd_ring[j] =[..]quoted
quoted
- (u32) (kmalloc((u32) (length + align),
GFP_KERNEL));
quoted
quoted
+ kmalloc((u32) (length + align),
GFP_KERNEL);
quoted
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 ?
It is to suppress the warnings. IMHO, most type casts are not technically important but for sanity check. - Leo