From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46537) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEjiT-000336-1H for qemu-devel@nongnu.org; Mon, 02 Apr 2012 12:02:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SEjiM-0000Oy-TS for qemu-devel@nongnu.org; Mon, 02 Apr 2012 12:02:48 -0400 Received: from plane.gmane.org ([80.91.229.3]:55902) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEjiM-0000Oj-NB for qemu-devel@nongnu.org; Mon, 02 Apr 2012 12:02:42 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SEjiL-0007OM-0U for qemu-devel@nongnu.org; Mon, 02 Apr 2012 18:02:41 +0200 Received: from 213.33.220.118 ([213.33.220.118]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 Apr 2012 18:02:40 +0200 Received: from m.kozlov by 213.33.220.118 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 Apr 2012 18:02:40 +0200 From: Maksim Kozlov Date: Mon, 02 Apr 2012 20:02:25 +0400 Message-ID: References: <1333363816-1691-1-git-send-email-berrange@redhat.com> <1333363816-1691-7-git-send-email-berrange@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit In-Reply-To: Subject: Re: [Qemu-devel] [PATCH 6/9] Fix bit test to use & instead of && and enable -Wlogical-op warning List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 02.04.2012 16:27, Peter Maydell пишет: > On 2 April 2012 11:50, Daniel P. Berrange wrote: >> diff --git a/hw/exynos4210_uart.c b/hw/exynos4210_uart.c >> index 73a9c18..4b20105 100644 >> --- a/hw/exynos4210_uart.c >> +++ b/hw/exynos4210_uart.c >> @@ -246,7 +246,7 @@ static uint32_t exynos4210_uart_Tx_FIFO_trigger_level(Exynos4210UartState *s) >> uint32_t level = 0; >> uint32_t reg; >> >> - reg = (s->reg[I_(UFCON)]&& UFCON_Tx_FIFO_TRIGGER_LEVEL)>> >> + reg = (s->reg[I_(UFCON)]& UFCON_Tx_FIFO_TRIGGER_LEVEL)>> >> UFCON_Tx_FIFO_TRIGGER_LEVEL_SHIFT; >> >> switch (s->channel) { >> @@ -277,7 +277,7 @@ static void exynos4210_uart_update_irq(Exynos4210UartState *s) >> */ >> if (s->reg[I_(UFCON)]&& UFCON_FIFO_ENABLE) { >> >> - uint32_t count = (s->reg[I_(UFSTAT)]&& UFSTAT_Tx_FIFO_COUNT)>> >> + uint32_t count = (s->reg[I_(UFSTAT)]& UFSTAT_Tx_FIFO_COUNT)>> >> UFSTAT_Tx_FIFO_COUNT_SHIFT; >> >> if (count<= exynos4210_uart_Tx_FIFO_trigger_level(s)) { > > Nice catch. Note that the '&& UFCON_FIFO_ENABLE' you can see in the context > to the second hunk is also wrong and needs fixing. > really nice catch :) ridiculous mistake > I'll take the exynos changes via arm-devs.next, but not the configure > change. Please can you submit a version of the patch that only fixes > the bugs and doesn't also change the gcc warning flags? > > thanks > -- PMM > >