From: "Randy.Dunlap" <rddunlap@osdl.org>
To: netdev@oss.sgi.com, jgarzik@pobox.com, corey@world.std.com
Subject: [PATCH 2/2] ray_cs: reduce stack usage (sockaddr)
Date: Fri, 28 Jan 2005 14:13:20 -0800 [thread overview]
Message-ID: <41FAB900.5020502@osdl.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 376 bytes --]
ray_cs: reduce local stack size in ray_dev_ioctl() from 468
to 340 bytes by having only 1 of these 128-byte arrays (which
is now at function scope):
struct sockaddr address[IW_MAX_SPY];
16 * 8 = 128
Signed-off-by: Randy Dunlap <rddunlap@osdl.org>
diffstat:=
drivers/net/wireless/ray_cs.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
[-- Attachment #2: raycs_stack2.patch --]
[-- Type: text/x-patch, Size: 1153 bytes --]
diff -Naurp ./drivers/net/wireless/ray_cs.c~raycs_sockaddr ./drivers/net/wireless/ray_cs.c
--- ./drivers/net/wireless/ray_cs.c~raycs_sockaddr 2005-01-27 21:05:51.000000000 -0800
+++ ./drivers/net/wireless/ray_cs.c 2005-01-28 14:00:02.129647488 -0800
@@ -1215,6 +1215,9 @@ static int ray_dev_ioctl(struct net_devi
#if WIRELESS_EXT > 7
struct iwreq *wrq = (struct iwreq *) ifr;
#endif /* WIRELESS_EXT > 7 */
+#ifdef WIRELESS_SPY
+ struct sockaddr address[IW_MAX_SPY];
+#endif /* WIRELESS_SPY */
if (!(link->state & DEV_PRESENT)) {
DEBUG(2,"ray_dev_ioctl - device not present\n");
@@ -1517,7 +1520,6 @@ static int ray_dev_ioctl(struct net_devi
/* If there is some addresses to copy */
if(local->spy_number > 0)
{
- struct sockaddr address[IW_MAX_SPY];
int i;
/* Copy addresses to the driver */
@@ -1557,7 +1559,6 @@ static int ray_dev_ioctl(struct net_devi
/* If the user want to have the addresses back... */
if((local->spy_number > 0) && (wrq->u.data.pointer != (caddr_t) 0))
{
- struct sockaddr address[IW_MAX_SPY];
int i;
/* Copy addresses from the lp structure */
next reply other threads:[~2005-01-28 22:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-28 22:13 Randy.Dunlap [this message]
2005-02-02 5:35 ` [PATCH 2/2] ray_cs: reduce stack usage (sockaddr) Jeff Garzik
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=41FAB900.5020502@osdl.org \
--to=rddunlap@osdl.org \
--cc=corey@world.std.com \
--cc=jgarzik@pobox.com \
--cc=netdev@oss.sgi.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.