summaryrefslogtreecommitdiff
path: root/drivers/s390/cio/chsc.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2006-08-30 12:33:35 (GMT)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2006-08-30 12:33:35 (GMT)
commit292888c81e74115db5e5a4a838f730a7c3662982 (patch)
tree16f7b7bf39cd8a72fa8d3aa5b71c8dc890b57c96 /drivers/s390/cio/chsc.c
parent8f61701bdf536c7a80f0f614bac91c7883804c4c (diff)
downloadlinux-292888c81e74115db5e5a4a838f730a7c3662982.tar.xz
[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.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c
index 61ce3f1..6405e9b 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. */