All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dtor@insightbb.com>
To: Om Narasimhan <om.turyx@gmail.com>
Cc: kernel-janitors@lists.osdl.org, linux-kernel@vger.kernel.org,
	bluez-devel@lists.sf.net
Subject: Re: [KJ] bluetooth drivers : kmalloc to kzalloc conversion
Date: Mon, 18 Sep 2006 01:21:33 +0000	[thread overview]
Message-ID: <200609172121.36247.dtor@insightbb.com> (raw)
In-Reply-To: <6b4e42d10609171754q7c7335f9pfab703d6b746236b@mail.gmail.com>

On Sunday 17 September 2006 20:54, Om Narasimhan wrote:> --- a/drivers/bluetooth/hci_usb.c> +++ b/drivers/bluetooth/hci_usb.c> @@ -147,10 +147,9 @@ static struct usb_device_id blacklist_id> >  static struct _urb *_urb_alloc(int isoc, gfp_t gfp)>  {> -       struct _urb *_urb = kmalloc(sizeof(struct _urb) +> +       struct _urb *_urb = kzalloc(sizeof(struct _urb) +>                                 sizeof(struct usb_iso_packet_descriptor) * isoc, gfp);>         if (_urb) {> -               memset(_urb, 0, sizeof(*_urb));>                 usb_init_urb(&_urb->urb);>         }>         return _urb;> 
Note that only beginning if the aloocated memory was zeroed in originalcode; your patch may introduce slowdowns.
-- Dmitry
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

WARNING: multiple messages have this Message-ID (diff)
From: Dmitry Torokhov <dtor@insightbb.com>
To: Om Narasimhan <om.turyx@gmail.com>
Cc: kernel-janitors@lists.osdl.org, linux-kernel@vger.kernel.org,
	bluez-devel@lists.sf.net
Subject: Re: [Bluez-devel] bluetooth drivers : kmalloc to kzalloc conversion
Date: Sun, 17 Sep 2006 21:21:33 -0400	[thread overview]
Message-ID: <200609172121.36247.dtor@insightbb.com> (raw)
In-Reply-To: <6b4e42d10609171754q7c7335f9pfab703d6b746236b@mail.gmail.com>

On Sunday 17 September 2006 20:54, Om Narasimhan wrote:
> --- a/drivers/bluetooth/hci_usb.c
> +++ b/drivers/bluetooth/hci_usb.c
> @@ -147,10 +147,9 @@ static struct usb_device_id blacklist_id
> =

> =A0static struct _urb *_urb_alloc(int isoc, gfp_t gfp)
> =A0{
> -=A0=A0=A0=A0=A0=A0=A0struct _urb *_urb =3D kmalloc(sizeof(struct _urb) +
> +=A0=A0=A0=A0=A0=A0=A0struct _urb *_urb =3D kzalloc(sizeof(struct _urb) +
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0sizeof(struct usb_iso_packet_descriptor) * isoc, gf=
p);
> =A0=A0=A0=A0=A0=A0=A0=A0if (_urb) {
> -=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0memset(_urb, 0, sizeof(*_ur=
b));
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0usb_init_urb(&_urb->urb);
> =A0=A0=A0=A0=A0=A0=A0=A0}
> =A0=A0=A0=A0=A0=A0=A0=A0return _urb;
> =


Note that only beginning if the aloocated memory was zeroed in original
code; your patch may introduce slowdowns.

-- =

Dmitry
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easi=
er
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D1=
21642
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

  reply	other threads:[~2006-09-18  1:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-18  0:54 [KJ] bluetooth drivers : kmalloc to kzalloc conversion Om Narasimhan
2006-09-18  0:54 ` Om Narasimhan
2006-09-18  0:54 ` [Bluez-devel] " Om Narasimhan
2006-09-18  1:21 ` Dmitry Torokhov [this message]
2006-09-18  1:21   ` Dmitry Torokhov
2006-09-18  2:24   ` [KJ] " Om Narasimhan
2006-09-18  2:24     ` Om Narasimhan
2006-09-18  2:24     ` [Bluez-devel] " Om Narasimhan
2006-09-18  2:38     ` [KJ] " Dmitry Torokhov
2006-09-18  2:38       ` Dmitry Torokhov
2006-09-18  2:38       ` [Bluez-devel] " Dmitry Torokhov
2006-09-18  6:13 ` [KJ] [Bluez-devel] bluetooth drivers : kmalloc to kzalloc Marcel Holtmann
2006-09-18  6:13   ` [Bluez-devel] bluetooth drivers : kmalloc to kzalloc conversion Marcel Holtmann
2006-09-18  6:13   ` Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200609172121.36247.dtor@insightbb.com \
    --to=dtor@insightbb.com \
    --cc=bluez-devel@lists.sf.net \
    --cc=kernel-janitors@lists.osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=om.turyx@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.