> +++ 2.6.10-rc1-bk1-usb/drivers/usb/class/usblp.c      2004-10-23 22:08:29.683277672 
> +0300
> @@ -854,11 +854,10 @@
>  
>       /* Malloc and start initializing usblp structure so we can use it
>        * directly. */
> -     if (!(usblp = kmalloc(sizeof(struct usblp), GFP_KERNEL))) {
> +     if (!(usblp = kcalloc(1, sizeof(*usblp), GFP_KERNEL))) {
>               err("out of memory for usblp");
>               goto abort;
>       }
> -     memset(usblp, 0, sizeof(struct usblp));
>       usblp->dev = dev;
>       init_MUTEX (&usblp->sem);
>       init_waitqueue_head(&usblp->wait);

I really cannot stand this style. Sizeofs taken off data instead of a type
are simply evil and misguided.

Can you at least leave usblp alone? It is the prime example driver which
has to stay clean.

-- Pete


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to