Received: from eggs.gnu.org ([2001:4830:134:3::10]:38100) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wmhfg-0004dP-6Y for qemu-devel@nongnu.org; Tue, 20 May 2014 06:53:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WmhfW-00086x-3U for qemu-devel@nongnu.org; Tue, 20 May 2014 06:53:24 -0400 Received: from e06smtp14.uk.ibm.com ([195.75.94.110]:40477) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WmhfV-00086T-Qr for qemu-devel@nongnu.org; Tue, 20 May 2014 06:53:14 -0400 Received: from /spool/local by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 20 May 2014 11:53:10 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 5599417D8056 for ; Tue, 20 May 2014 11:54:20 +0100 (BST) Received: from d06av10.portsmouth.uk.ibm.com (d06av10.portsmouth.uk.ibm.com [9.149.37.251]) by b06cxnps3075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s4KAr86B59375854 for ; Tue, 20 May 2014 10:53:08 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 s4KAr8Hb007027 for ; Tue, 20 May 2014 04:53:08 -0600 Date: Tue, 20 May 2014 12:53:06 +0200 From: Cornelia Huck Message-ID: <20140520125306.4c50a8d4.cornelia.huck@de.ibm.com> In-Reply-To: <1399888297-4751-1-git-send-email-agraf@suse.de> References: <1399888297-4751-1-git-send-email-agraf@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] kvm: Fix enable_cap helpers on older gcc List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: qemu-devel@nongnu.org, Thomas Huth On Mon, 12 May 2014 11:51:37 +0200 Alexander Graf wrote: > Commit 40f1ee27aa1 introduced handy helpers for enable_cap calls on > vcpu and vm level. Unfortunately some older gcc versions (4.7.1, 4.6) > seem to choke on signedness detection in inline created variables: > > target-ppc/kvm.c: In function 'kvmppc_booke_watchdog_enable': > target-ppc/kvm.c:1302:21: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits] > target-ppc/kvm.c: In function 'kvmppc_set_papr': > target-ppc/kvm.c:1504:21: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits] > > However - thanks to Thomas Huth for the suggestion - we can just cast the > offending potentially 0 value to a signed type, making the comparison signed. > > Signed-off-by: Alexander Graf > Mind if I take this through s390-next instead of your tree, so I can send a pull request with clean conscience?