diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2006-08-30 14:33:35 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-08-30 14:33:35 +0200 |
commit | 292888c81e74115db5e5a4a838f730a7c3662982 (patch) | |
tree | 16f7b7bf39cd8a72fa8d3aa5b71c8dc890b57c96 /drivers/s390/cio/chsc.c | |
parent | 8f61701bdf536c7a80f0f614bac91c7883804c4c (diff) | |
download | lwn-292888c81e74115db5e5a4a838f730a7c3662982.tar.gz lwn-292888c81e74115db5e5a4a838f730a7c3662982.zip |
[S390] cio: kernel stack overflow.
Use different kind of assignment to make sure gcc doesn't create code
that creates temp variables on the stack, assigns values to it and
copies the content of the whole temp variable to the destination.
This reduces stack usage of e.g. ccwgroup_driver_register from 976
to 48 bytes instead.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/chsc.c')
-rw-r--r-- | drivers/s390/cio/chsc.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c index 61ce3f1d5228..6405e9bd6eb3 100644 --- a/drivers/s390/cio/chsc.c +++ b/drivers/s390/cio/chsc.c @@ -1391,10 +1391,8 @@ new_channel_path(int chpid) /* fill in status, etc. */ chp->id = chpid; chp->state = 1; - chp->dev = (struct device) { - .parent = &css[0]->device, - .release = chp_release, - }; + chp->dev.parent = &css[0]->device; + chp->dev.release = chp_release; snprintf(chp->dev.bus_id, BUS_ID_SIZE, "chp0.%x", chpid); /* Obtain channel path description and fill it in. */ |