diff mbox series

[4/7] pc-bios: s390x: Rework data initialization

Message ID 20200715094045.381984-5-frankja@linux.ibm.com
State New
Headers show
Series pc-bios: s390x: Cleanup part 2 | expand

Commit Message

Janosch Frank July 15, 2020, 9:40 a.m. UTC
Sometimes a memset is nicer to read than multiple struct->data = 0;

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.ibm.com>
---
 pc-bios/s390-ccw/dasd-ipl.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/pc-bios/s390-ccw/dasd-ipl.c b/pc-bios/s390-ccw/dasd-ipl.c
index e8f2846740..0543334ed4 100644
--- a/pc-bios/s390-ccw/dasd-ipl.c
+++ b/pc-bios/s390-ccw/dasd-ipl.c
@@ -167,16 +167,13 @@  static void ipl1_fixup(void)
     ccwSeek->cda = ptr2u32(seekData);
     ccwSeek->chain = 1;
     ccwSeek->count = sizeof(*seekData);
-    seekData->reserved = 0x00;
-    seekData->cyl = 0x00;
-    seekData->head = 0x00;
+    memset(seekData, 0, sizeof(*seekData));
 
     ccwSearchID->cmd_code = CCW_CMD_DASD_SEARCH_ID_EQ;
     ccwSearchID->cda = ptr2u32(searchData);
     ccwSearchID->chain = 1;
     ccwSearchID->count = sizeof(*searchData);
-    searchData->cyl = 0;
-    searchData->head = 0;
+    memset(searchData, 0, sizeof(*searchData));
     searchData->record = 2;
 
     /* Go back to Search CCW if correct record not yet found */