OSDN Git Service

s390x/ipl: avoid sign extension
authorCornelia Huck <cornelia.huck@de.ibm.com>
Thu, 26 Mar 2015 09:41:45 +0000 (10:41 +0100)
committerCornelia Huck <cornelia.huck@de.ibm.com>
Mon, 30 Mar 2015 07:25:17 +0000 (09:25 +0200)
Make s390_update_iplstate() return uint32_t to avoid sign extensions
for cssids > 127. While this doesn't matter in practice yet (as
nobody supports MCSS-E and thus won't see the real cssid), play safe.

Reported-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Jason J. Herne <jjherne@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
hw/s390x/ipl.c

index 5c86613..2e26d2a 100644 (file)
@@ -218,7 +218,7 @@ static Property s390_ipl_properties[] = {
  * - -1 if no valid boot device was found
  * - ccw id of the boot device otherwise
  */
-static uint64_t s390_update_iplstate(CPUS390XState *env, S390IPLState *ipl)
+static uint32_t s390_update_iplstate(CPUS390XState *env, S390IPLState *ipl)
 {
     DeviceState *dev_st;