* [PATCH][trivial] airo: reduce stack memory footpring
@ 2009-02-25 14:39 Frank Seidel
2009-02-25 14:44 ` Frank Seidel
0 siblings, 1 reply; 2+ messages in thread
From: Frank Seidel @ 2009-02-25 14:39 UTC (permalink / raw)
To: linux kernel, linux-wireless@vger.kernel.org, akpm, hannes,
johannes, David S. Miller, Frank Seidel, Frank Seidel, wangchen,
John W. Linville
From: Frank Seidel <frank@f-seidel.de>
Applying kernel janitors todos (reduce stack
footprint where possible) to airo wireless driver.
(Before 1124 bytes on i386, now 876)
Signed-off-by: Frank Seidel <frank@f-seidel.de>
---
drivers/net/wireless/airo.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -7031,11 +7031,15 @@ static int airo_get_aplist(struct net_de
{
struct airo_info *local = dev->ml_priv;
struct sockaddr *address = (struct sockaddr *) extra;
- struct iw_quality qual[IW_MAX_AP];
+ struct iw_quality *qual;
BSSListRid BSSList;
int i;
int loseSync = capable(CAP_NET_ADMIN) ? 1: -1;
+ qual = kmalloc(IW_MAX_AP * sizeof(*qual), GFP_KERNEL);
+ if (!qual)
+ return -ENOMEM;
+
for (i = 0; i < IW_MAX_AP; i++) {
u16 dBm;
if (readBSSListRid(local, loseSync, &BSSList))
@@ -7090,6 +7094,7 @@ static int airo_get_aplist(struct net_de
}
dwrq->length = i;
+ kfree(qual);
return 0;
}
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH][trivial] airo: reduce stack memory footpring
2009-02-25 14:39 [PATCH][trivial] airo: reduce stack memory footpring Frank Seidel
@ 2009-02-25 14:44 ` Frank Seidel
0 siblings, 0 replies; 2+ messages in thread
From: Frank Seidel @ 2009-02-25 14:44 UTC (permalink / raw)
To: Frank Seidel
Cc: linux kernel, linux-wireless@vger.kernel.org, akpm, hannes,
johannes, David S. Miller, wangchen, John W. Linville,
Frank Seidel
Sorry, $SUBJECT should of course be:
[PATCH][trivial] airo: reduce stack memory footprint
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-02-25 14:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-25 14:39 [PATCH][trivial] airo: reduce stack memory footpring Frank Seidel
2009-02-25 14:44 ` Frank Seidel
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).