On 5/20/20 9:53 PM, Thomas Huth wrote: > On 14/05/2020 14.37, Janosch Frank wrote: >> Let's consolidate timing related functions into one header. >> >> Signed-off-by: Janosch Frank >> --- >> pc-bios/s390-ccw/menu.c | 1 + >> pc-bios/s390-ccw/netmain.c | 15 +++---------- >> pc-bios/s390-ccw/s390-ccw.h | 18 ---------------- >> pc-bios/s390-ccw/time.h | 39 ++++++++++++++++++++++++++++++++++ >> pc-bios/s390-ccw/virtio-net.c | 1 + >> pc-bios/s390-ccw/virtio-scsi.c | 1 + >> pc-bios/s390-ccw/virtio.c | 18 +++------------- >> 7 files changed, 48 insertions(+), 45 deletions(-) >> create mode 100644 pc-bios/s390-ccw/time.h >> >> diff --git a/pc-bios/s390-ccw/menu.c b/pc-bios/s390-ccw/menu.c >> index ce3815b201..7925c33248 100644 >> --- a/pc-bios/s390-ccw/menu.c >> +++ b/pc-bios/s390-ccw/menu.c >> @@ -12,6 +12,7 @@ >> #include "libc.h" >> #include "s390-ccw.h" >> #include "sclp.h" >> +#include "time.h" >> >> #define KEYCODE_NO_INP '\0' >> #define KEYCODE_ESCAPE '\033' >> diff --git a/pc-bios/s390-ccw/netmain.c b/pc-bios/s390-ccw/netmain.c >> index 309ffa30d9..73def8de4f 100644 >> --- a/pc-bios/s390-ccw/netmain.c >> +++ b/pc-bios/s390-ccw/netmain.c >> @@ -35,6 +35,7 @@ >> #include "s390-ccw.h" >> #include "cio.h" >> #include "virtio.h" >> +#include "time.h" > > netmain.c already contains a #include which pulls in the header > with the same name from libnet in SLOF ... so I wonder why you don't run > into trouble here, I'd expect that your local time.h now rather gets > included twice. Did you rebuild s390-netboot.img without problems? > Anyway, time.h is maybe not the best name for a new header here... > > Thomas > That doesn't seem to be a problem when compiling. However we could just move all of the function into helper.h as it's really not a lot of code especially after splitting it up into helper.h and time.h. Or we could use s390-time.h