On Tue, Nov 11, 2014 at 04:12:24PM -0800, Jordan Justen wrote: > EDK II code should not include system include files. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Jordan Justen <jordan.l.jus...@intel.com> > Cc: Anthony PERARD <anthony.per...@citrix.com> > Cc: Scott Duplichan <sc...@notabs.org> > --- > OvmfPkg/XenPvBlkDxe/BlockFront.c | 12 ++++-------- > 1 file changed, 4 insertions(+), 8 deletions(-) > > diff --git a/OvmfPkg/XenPvBlkDxe/BlockFront.c > b/OvmfPkg/XenPvBlkDxe/BlockFront.c > index 8d43d83..c43e7af 100644 > --- a/OvmfPkg/XenPvBlkDxe/BlockFront.c > +++ b/OvmfPkg/XenPvBlkDxe/BlockFront.c > @@ -3,6 +3,7 @@ > > Copyright (c) 2007-2008 Samuel Thibault. > Copyright (C) 2014, Citrix Ltd. > + Copyright (c) 2014, Intel Corporation. All rights reserved.<BR> > > Redistribution and use in source and binary forms, with or without > modification, are permitted provided that the following conditions > @@ -34,11 +35,6 @@ > #include <IndustryStandard/Xen/io/protocols.h> > #include <IndustryStandard/Xen/io/xenbus.h> > > -// > -// Header used for UINT32_MAX and UINT16_MAX > -// > -#include "inttypes.h" > - > /** > Helper to read an integer from XenStore. > > @@ -191,7 +187,7 @@ XenPvBlockFrontInitialization ( > FreePool (DeviceType); > > Status = XenBusReadUint64 (XenBusIo, "backend-id", FALSE, &Value); > - if (Status != XENSTORE_STATUS_SUCCESS || Value > UINT16_MAX) { > + if (Status != XENSTORE_STATUS_SUCCESS || Value > MAX_UINT16) { > DEBUG ((EFI_D_ERROR, "XenPvBlk: Failed to get backend-id (%d)\n", > Status)); > goto Error; > @@ -259,7 +255,7 @@ Again: > } > > Status = XenBusReadUint64 (XenBusIo, "info", TRUE, &Value); > - if (Status != XENSTORE_STATUS_SUCCESS || Value > UINT32_MAX) { > + if (Status != XENSTORE_STATUS_SUCCESS || Value > MAX_UINT32) { > goto Error2; > } > Dev->MediaInfo.VDiskInfo = Value; > @@ -275,7 +271,7 @@ Again: > } > > Status = XenBusReadUint64 (XenBusIo, "sector-size", TRUE, &Value); > - if (Status != XENSTORE_STATUS_SUCCESS || Value > UINT32_MAX) { > + if (Status != XENSTORE_STATUS_SUCCESS || Value > MAX_UINT32) { > goto Error2; > } > if (Value % 512 != 0) {
Reviewed-by: Anthony PERARD <anthony.per...@citrix.com> Thanks, -- Anthony PERARD ------------------------------------------------------------------------------ Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel