public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Paulo Marques <pmarques@grupopie.com>
Cc: dsaxena@plexity.net, Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [BLUETOOTH] kmalloc + memset -> kzalloc conversion
Date: Thu, 13 Oct 2005 11:52:57 +0200	[thread overview]
Message-ID: <1129197177.6543.16.camel@localhost.localdomain> (raw)
In-Reply-To: <434CFF51.1070709@grupopie.com>

Hi Paulo,

> >>>Confused.  This patch changes lots of block code, not bluetooth.
> >>
> >>I know. This is what I already mailed Deepak, but he never replied.
> > 
> > Sorry, got lost in the mailbox. I think I was not paying attention to
> > my tab completion and included the wrong patch. Proper patch follows.
> > 
> [...]
> > --- a/drivers/bluetooth/hci_usb.c
> > +++ b/drivers/bluetooth/hci_usb.c
> > @@ -134,10 +134,9 @@ static struct usb_device_id blacklist_id
> >  
> >  static struct _urb *_urb_alloc(int isoc, unsigned int __nocast 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;
> 
> This one doesn't keep the exact same behavior as before, as it is 
> zeroing more memory than it did.
> 
> If this is not a performance critical path, then I guess it's ok (code 
> size reduction, and all).
> 
> I just wanted to call some attention on this so that someone more 
> knowledgeable than me in the bluetooth ways can make sure it's ok.

the current hci_usb URB shim layer is crap anyhow. We need to replace it
at some point with better code, but so far I haven't had the time to do
this properly.

Regards

Marcel



      reply	other threads:[~2005-10-13  9:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-01  6:51 [PATCH] [BLUETOOTH] kmalloc + memset -> kzalloc conversion Deepak Saxena
2005-10-01  9:42 ` Marcel Holtmann
2005-10-11 22:18 ` Andrew Morton
2005-10-11 22:52   ` Marcel Holtmann
2005-10-11 23:04     ` Deepak Saxena
2005-10-12 12:19       ` Paulo Marques
2005-10-13  9:52         ` Marcel Holtmann [this message]

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=1129197177.6543.16.camel@localhost.localdomain \
    --to=marcel@holtmann.org \
    --cc=akpm@osdl.org \
    --cc=dsaxena@plexity.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmarques@grupopie.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox