From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49498) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yb9pT-00040Z-45 for qemu-devel@nongnu.org; Thu, 26 Mar 2015 11:36:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yb9pO-0000Zc-EV for qemu-devel@nongnu.org; Thu, 26 Mar 2015 11:36:19 -0400 Received: from e06smtp17.uk.ibm.com ([195.75.94.113]:47455) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yb9pO-0000ZN-4Q for qemu-devel@nongnu.org; Thu, 26 Mar 2015 11:36:14 -0400 Received: from /spool/local by e06smtp17.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 26 Mar 2015 15:36:13 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id BE7462190056 for ; Thu, 26 Mar 2015 15:35:58 +0000 (GMT) Received: from d06av10.portsmouth.uk.ibm.com (d06av10.portsmouth.uk.ibm.com [9.149.37.251]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t2QFaApE10682698 for ; Thu, 26 Mar 2015 15:36:10 GMT Received: from d06av10.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av10.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t2QFa9Wg017751 for ; Thu, 26 Mar 2015 09:36:10 -0600 From: Cornelia Huck Date: Thu, 26 Mar 2015 16:36:02 +0100 Message-Id: <1427384162-4994-5-git-send-email-cornelia.huck@de.ibm.com> In-Reply-To: <1427384162-4994-1-git-send-email-cornelia.huck@de.ibm.com> References: <1427384162-4994-1-git-send-email-cornelia.huck@de.ibm.com> Subject: [Qemu-devel] [PATCH for-2.3 4/4] s390x/ipl: avoid sign extension List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Cornelia Huck , borntraeger@de.ibm.com, jfrei@linux.vnet.ibm.com, agraf@suse.de 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 Reviewed-by: Jason J. Herne Signed-off-by: Cornelia Huck --- hw/s390x/ipl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c index 5c86613..2e26d2a 100644 --- a/hw/s390x/ipl.c +++ b/hw/s390x/ipl.c @@ -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; -- 2.3.4