* [PATCH] sb1000: reduce ioctl stack usage
@ 2005-01-31 2:12 Randy.Dunlap
0 siblings, 0 replies; only message in thread
From: Randy.Dunlap @ 2005-01-31 2:12 UTC (permalink / raw)
To: jgarzik, netdev, fventuri, shirsch
[-- Attachment #1: Type: text/plain, Size: 407 bytes --]
sb1000_dev_ioctl() (on i386) uses 824 bytes of stack space,
all due to overuse of inline functions.
By changing a few infrequently used functions to non-inline,
the stack usage is reduced to only 60 bytes.
Nothing in a fast path is changed.
Signed-off-by: Randy Dunlap <rddunlap@osdl.org>
diffstat:=
drivers/net/sb1000.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
[-- Attachment #2: sb1000_stack.patch --]
[-- Type: text/x-patch, Size: 2447 bytes --]
diff -Naurp ./drivers/net/sb1000.c~sb1000_stack ./drivers/net/sb1000.c
--- ./drivers/net/sb1000.c~sb1000_stack 2004-12-24 13:33:51.000000000 -0800
+++ ./drivers/net/sb1000.c 2005-01-30 17:49:27.409413904 -0800
@@ -116,15 +116,15 @@ static inline int sb1000_start_get_set_c
static inline int sb1000_end_get_set_command(const int ioaddr[],
const char* name);
static inline int sb1000_activate(const int ioaddr[], const char* name);
-static inline int sb1000_get_firmware_version(const int ioaddr[],
+static int sb1000_get_firmware_version(const int ioaddr[],
const char* name, unsigned char version[], int do_end);
-static inline int sb1000_get_frequency(const int ioaddr[], const char* name,
+static int sb1000_get_frequency(const int ioaddr[], const char* name,
int* frequency);
-static inline int sb1000_set_frequency(const int ioaddr[], const char* name,
+static int sb1000_set_frequency(const int ioaddr[], const char* name,
int frequency);
-static inline int sb1000_get_PIDs(const int ioaddr[], const char* name,
+static int sb1000_get_PIDs(const int ioaddr[], const char* name,
short PID[]);
-static inline int sb1000_set_PIDs(const int ioaddr[], const char* name,
+static int sb1000_set_PIDs(const int ioaddr[], const char* name,
const short PID[]);
/* SB1000 commands for frame rx interrupt */
@@ -552,7 +552,7 @@ sb1000_activate(const int ioaddr[], cons
}
/* get SB1000 firmware version */
-static inline int
+static int
sb1000_get_firmware_version(const int ioaddr[], const char* name,
unsigned char version[], int do_end)
{
@@ -575,7 +575,7 @@ sb1000_get_firmware_version(const int io
}
/* get SB1000 frequency */
-static inline int
+static int
sb1000_get_frequency(const int ioaddr[], const char* name, int* frequency)
{
unsigned char st[7];
@@ -592,7 +592,7 @@ sb1000_get_frequency(const int ioaddr[],
}
/* set SB1000 frequency */
-static inline int
+static int
sb1000_set_frequency(const int ioaddr[], const char* name, int frequency)
{
unsigned char st[7];
@@ -622,7 +622,7 @@ sb1000_set_frequency(const int ioaddr[],
}
/* get SB1000 PIDs */
-static inline int
+static int
sb1000_get_PIDs(const int ioaddr[], const char* name, short PID[])
{
unsigned char st[7];
@@ -656,7 +656,7 @@ sb1000_get_PIDs(const int ioaddr[], cons
}
/* set SB1000 PIDs */
-static inline int
+static int
sb1000_set_PIDs(const int ioaddr[], const char* name, const short PID[])
{
unsigned char st[7];
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-01-31 2:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-31 2:12 [PATCH] sb1000: reduce ioctl stack usage Randy.Dunlap
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).