From: Larry Finger <Larry.Finger@lwfinger.net>
To: Joe Perches <joe@perches.com>
Cc: John W Linville <linville@tuxdriver.com>, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] rtlwifi: Preallocate USB read buffers and eliminate kalloc in read routine
Date: Mon, 19 Mar 2012 15:36:18 -0500 [thread overview]
Message-ID: <4F6798C2.1000203@lwfinger.net> (raw)
In-Reply-To: <1332125197.23125.41.camel@joe2Laptop>
On 03/18/2012 09:46 PM, Joe Perches wrote:
> On Sun, 2012-03-18 at 21:42 -0500, Larry Finger wrote:
>> The current version of rtlwifi for USB operations uses kmalloc to
>> acquire a 32-bit buffer for reading.
>
> trivia:
>
>> +++ wireless-testing-new/drivers/net/wireless/rtlwifi/usb.c
> []
>> @@ -955,6 +947,13 @@ int __devinit rtl_usb_probe(struct usb_i
>> return -ENOMEM;
>> }
>> rtlpriv = hw->priv;
>> + rtlpriv->usb_data = kzalloc(RTL_USB_MAX_RX_COUNT * sizeof(u32),
>> + GFP_KERNEL);
>> + if (!rtlpriv->usb_data) {
>> + RT_ASSERT(false, "USB data buffer allocation failed\n");
>
> The RT_ASSERT isn't really necessary as kzalloc already
> does a dump_stack on allocation failure.
I thought it only dumped the stack when some form of kernel debugging was enabled.
Larry
>
>
next prev parent reply other threads:[~2012-03-19 20:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-19 2:42 [PATCH] rtlwifi: Preallocate USB read buffers and eliminate kalloc in read routine Larry Finger
2012-03-19 2:46 ` Joe Perches
2012-03-19 20:36 ` Larry Finger [this message]
2012-03-19 20:52 ` Joe Perches
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=4F6798C2.1000203@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=joe@perches.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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.