From patchwork Mon Mar 30 08:02:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cornelia Huck X-Patchwork-Id: 455999 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3FAA3140082 for ; Mon, 30 Mar 2015 19:04:09 +1100 (AEDT) Received: from localhost ([::1]:59962 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcUg3-0001I8-BF for incoming@patchwork.ozlabs.org; Mon, 30 Mar 2015 04:04:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51745) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcUfS-0000DR-GQ for qemu-devel@nongnu.org; Mon, 30 Mar 2015 04:03:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YcUfN-0002BP-E2 for qemu-devel@nongnu.org; Mon, 30 Mar 2015 04:03:30 -0400 Received: from e06smtp15.uk.ibm.com ([195.75.94.111]:32773) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcUfN-0002BD-4b for qemu-devel@nongnu.org; Mon, 30 Mar 2015 04:03:25 -0400 Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 30 Mar 2015 09:03:24 +0100 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 30 Mar 2015 09:03:21 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id A6DDD17D805A for ; Mon, 30 Mar 2015 09:03:50 +0100 (BST) Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t2U83KYc8192358 for ; Mon, 30 Mar 2015 08:03:20 GMT Received: from d06av02.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t2U83HSj012132 for ; Mon, 30 Mar 2015 02:03:20 -0600 Received: from gondolin.boeblingen.de.ibm.com (dyn-9-152-224-143.boeblingen.de.ibm.com [9.152.224.143]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t2U82Ytw011318; Mon, 30 Mar 2015 02:03:17 -0600 From: Cornelia Huck To: peter.maydell@linaro.org Date: Mon, 30 Mar 2015 10:02:27 +0200 Message-Id: <1427702547-21261-5-git-send-email-cornelia.huck@de.ibm.com> X-Mailer: git-send-email 2.3.4 In-Reply-To: <1427702547-21261-1-git-send-email-cornelia.huck@de.ibm.com> References: <1427702547-21261-1-git-send-email-cornelia.huck@de.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15033008-0021-0000-0000-00000366A376 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 195.75.94.111 Cc: Cornelia Huck , borntraeger@de.ibm.com, jfrei@linux.vnet.ibm.com, qemu-devel@nongnu.org, agraf@suse.de Subject: [Qemu-devel] [PULL for-2.3 4/4] s390x/ipl: avoid sign extension X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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;