From: Daniel Drake <dsd@gentoo.org>
To: Oliver Neukum <oliver@neukum.org>
Cc: linux-usb-devel@lists.sourceforge.net,
"John W. Linville" <linville@tuxdriver.com>,
netdev@vger.kernel.org, Ulrich Kunitz <kune@deine-taler.de>
Subject: Re: [linux-usb-devel] [PATCH RFC] ZyDAS ZD1211 USB-WLAN driver
Date: Sat, 03 Jun 2006 20:35:51 +0100 [thread overview]
Message-ID: <4481E497.2000505@gentoo.org> (raw)
In-Reply-To: <200606031951.09135.oliver@neukum.org>
Oliver Neukum wrote:
> +static int read_mac_addr(struct zd_chip *chip, u8 *mac_addr)
> +{
> + static const zd_addr_t addr[2] = { CR_MAC_ADDR_P1, CR_MAC_ADDR_P2 };
> + return _read_mac_addr(chip, mac_addr, (const zd_addr_t *)addr);
> +}
>
> Why on the stack?
Technically it's not on the stack because it is static const (it goes in
rodata), but I don't think that this invalidates your point. What's the
alternative? kmalloc and kfree every time?
(Just seems a little over the top for such a small array)
> +static int zd1211_hw_reset_phy(struct zd_chip *chip)
> +{
> + static const struct zd_ioreq16 ioreqs[] = {
>
> This is too much to allocate on the stack.
Again static const, it's definately in rodata, checked with objdump. Do
we need to change this?
> +static void disconnect(struct usb_interface *intf)
> This is racy. It allows io to disconnected devices. You must take the
> lock and set a flag that you test after you've taken the lock elsewhere.
Will fix, thanks.
Daniel
next prev parent reply other threads:[~2006-06-03 19:35 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-03 11:20 [PATCH RFC] ZyDAS ZD1211 USB-WLAN driver Daniel Drake
2006-06-03 17:51 ` [linux-usb-devel] " Oliver Neukum
2006-06-03 19:35 ` Daniel Drake [this message]
2006-06-03 22:25 ` Oliver Neukum
2006-06-04 16:29 ` John Que
2006-06-04 17:17 ` Oliver Neukum
2006-06-04 18:03 ` Rami Rosen
2006-06-04 21:51 ` Daniel Drake
2006-06-04 18:22 ` John Que
2006-06-04 19:06 ` Oliver Neukum
2006-06-04 21:45 ` Daniel Drake
2006-06-06 5:41 ` David Brownell
2006-06-10 11:23 ` Ulrich Kunitz
2006-06-10 11:49 ` Oliver Neukum
2006-06-10 12:40 ` [linux-usb-devel] " Daniel Drake
2006-06-10 19:37 ` Daniel Drake
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=4481E497.2000505@gentoo.org \
--to=dsd@gentoo.org \
--cc=kune@deine-taler.de \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=linville@tuxdriver.com \
--cc=netdev@vger.kernel.org \
--cc=oliver@neukum.org \
/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;
as well as URLs for NNTP newsgroup(s).