From patchwork Fri Apr 13 13:04:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 152303 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A3854B7011 for ; Fri, 13 Apr 2012 23:27:14 +1000 (EST) Received: from localhost ([::1]:46738 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SIgWu-00079J-AN for incoming@patchwork.ozlabs.org; Fri, 13 Apr 2012 09:27:12 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43795) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SIgWZ-00075I-7m for qemu-devel@nongnu.org; Fri, 13 Apr 2012 09:26:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SIgWU-00057f-Oo for qemu-devel@nongnu.org; Fri, 13 Apr 2012 09:26:50 -0400 Received: from mnementh.archaic.org.uk ([81.2.115.146]:37504) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SIgWU-00056e-GJ for qemu-devel@nongnu.org; Fri, 13 Apr 2012 09:26:46 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1SIgBR-0007a6-HS; Fri, 13 Apr 2012 14:05:01 +0100 From: Peter Maydell To: Anthony Liguori , Blue Swirl Date: Fri, 13 Apr 2012 14:04:46 +0100 Message-Id: <1334322301-29115-2-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1334322301-29115-1-git-send-email-peter.maydell@linaro.org> References: <1334322301-29115-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 81.2.115.146 Cc: qemu-devel@nongnu.org, Paul Brook Subject: [Qemu-devel] [PATCH 01/16] Fix bit test in Exynos4210 UART emulation to use & instead of && 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 From: Daniel P. Berrange * hw/exynos4210_uart.c: s/&&/&/ Signed-off-by: Daniel P. Berrange Signed-off-by: Peter Maydell --- hw/exynos4210_uart.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/exynos4210_uart.c b/hw/exynos4210_uart.c index 73a9c18..ccc4780 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) { @@ -275,9 +275,9 @@ static void exynos4210_uart_update_irq(Exynos4210UartState *s) * The Tx interrupt is always requested if the number of data in the * transmit FIFO is smaller than the trigger level. */ - if (s->reg[I_(UFCON)] && UFCON_FIFO_ENABLE) { + 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)) {