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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Ahmed S. Darwish [mailto:[email protected]]
> Sent: Monday, January 08, 2007 12:27 PM
> To: Li Yang-r58472
> Cc: [email protected]; [email protected]
> 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:
> > > From: Ahmed S. Darwish [mailto:[email protected]]
> > >
> > > Hi,
> > > A kmalloc casting cleanup patch.
> > > Signed-off-by: Ahmed Darwish <[email protected]>
> 
> [..]
> 
> > > -				(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] =
> 
> [..]
> 
> > > -			    (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 ?

It is to suppress the warnings.  IMHO, most type casts are not
technically important but for sanity check.

- Leo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux