diff options
author | Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> | 2006-02-01 03:06:25 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-01 08:53:22 -0800 |
commit | 854e981cc69bb93b49bdd052c8bc1dc744509f04 (patch) | |
tree | f45d1f19cc43c70f8f012ce7be667a3614e89cdb /arch/um/drivers/slip_common.h | |
parent | 98105d47d3d62eb68d06d85dd448699678d725fc (diff) | |
download | kernel_samsung_tuna-854e981cc69bb93b49bdd052c8bc1dc744509f04.zip kernel_samsung_tuna-854e981cc69bb93b49bdd052c8bc1dc744509f04.tar.gz kernel_samsung_tuna-854e981cc69bb93b49bdd052c8bc1dc744509f04.tar.bz2 |
[PATCH] uml: fix hugest stack users
The C99 initialization, with GCC's bad handling, for 6K wide structs (which
_aren't_ on the stack), is causing GCC to use 12K for these silly procs with 3
vars. Workaround this.
Note that .name = { '\0' } translates to memset(->name, 0, '->name' size) - I verified
this with GCC's docs and a testprogram.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/drivers/slip_common.h')
-rw-r--r-- | arch/um/drivers/slip_common.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/um/drivers/slip_common.h b/arch/um/drivers/slip_common.h index 2ae76d8..d574e0a 100644 --- a/arch/um/drivers/slip_common.h +++ b/arch/um/drivers/slip_common.h @@ -88,12 +88,13 @@ struct slip_proto { int esc; }; -#define SLIP_PROTO_INIT { \ - .ibuf = { '\0' }, \ - .obuf = { '\0' }, \ - .more = 0, \ - .pos = 0, \ - .esc = 0 \ +static inline void slip_proto_init(struct slip_proto * slip) +{ + memset(slip->ibuf, 0, sizeof(slip->ibuf)); + memset(slip->obuf, 0, sizeof(slip->obuf)); + slip->more = 0; + slip->pos = 0; + slip->esc = 0; } extern int slip_proto_read(int fd, void *buf, int len, |