* [PATCH 2/2] ray_cs: reduce stack usage (sockaddr)
@ 2005-01-28 22:13 Randy.Dunlap
2005-02-02 5:35 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Randy.Dunlap @ 2005-01-28 22:13 UTC (permalink / raw)
To: netdev, jgarzik, corey
[-- 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 */
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 2/2] ray_cs: reduce stack usage (sockaddr)
2005-01-28 22:13 [PATCH 2/2] ray_cs: reduce stack usage (sockaddr) Randy.Dunlap
@ 2005-02-02 5:35 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2005-02-02 5:35 UTC (permalink / raw)
To: Randy.Dunlap; +Cc: netdev, corey
applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-02-02 5:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-28 22:13 [PATCH 2/2] ray_cs: reduce stack usage (sockaddr) Randy.Dunlap
2005-02-02 5:35 ` Jeff Garzik
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).