From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38214) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wmhfz-0004qY-85 for qemu-devel@nongnu.org; Tue, 20 May 2014 06:53:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wmhft-0008E6-7I for qemu-devel@nongnu.org; Tue, 20 May 2014 06:53:43 -0400 Received: from cantor2.suse.de ([195.135.220.15]:32870 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wmhft-0008Dz-1g for qemu-devel@nongnu.org; Tue, 20 May 2014 06:53:37 -0400 Message-ID: <537B342E.8010700@suse.de> Date: Tue, 20 May 2014 12:53:34 +0200 From: Alexander Graf MIME-Version: 1.0 References: <1399888297-4751-1-git-send-email-agraf@suse.de> <20140520125306.4c50a8d4.cornelia.huck@de.ibm.com> In-Reply-To: <20140520125306.4c50a8d4.cornelia.huck@de.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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: Cornelia Huck Cc: qemu-devel@nongnu.org, Thomas Huth On 20.05.14 12:53, Cornelia Huck wrote: > 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? > Sure, whoever hits master first wins ;) Alex