From patchwork Tue Oct 18 10:22:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 120404 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 913F51007D2 for ; Tue, 18 Oct 2011 21:22:32 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6FE7A28F5E; Tue, 18 Oct 2011 12:22:27 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 95IAm3XwLpw6; Tue, 18 Oct 2011 12:22:27 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 86E7C29014; Tue, 18 Oct 2011 12:22:19 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A537728788 for ; Tue, 18 Oct 2011 12:22:17 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hrsiXRG41VDr for ; Tue, 18 Oct 2011 12:22:17 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-yx0-f172.google.com (mail-yx0-f172.google.com [209.85.213.172]) by theia.denx.de (Postfix) with ESMTPS id BF38C286D9 for ; Tue, 18 Oct 2011 12:22:15 +0200 (CEST) Received: by yxj19 with SMTP id 19so414060yxj.3 for ; Tue, 18 Oct 2011 03:22:14 -0700 (PDT) Received: by 10.223.6.89 with SMTP id 25mr2391604fay.30.1318933333947; Tue, 18 Oct 2011 03:22:13 -0700 (PDT) Received: from localhost ([178.23.216.97]) by mx.google.com with ESMTPS id f23sm2859206faf.0.2011.10.18.03.22.12 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 18 Oct 2011 03:22:13 -0700 (PDT) From: Michal Simek To: u-boot@lists.denx.de Date: Tue, 18 Oct 2011 12:22:10 +0200 Message-Id: <1318933330-17883-2-git-send-email-monstr@monstr.eu> X-Mailer: git-send-email 1.5.5.1 In-Reply-To: <1318933330-17883-1-git-send-email-monstr@monstr.eu> References: <1318933330-17883-1-git-send-email-monstr@monstr.eu> Subject: [U-Boot] [PATCH 2/2] serial: uartlite: Fix compilation warnings X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Do not setup userial_ports array as const because in uartlite_serial_putc is out_be32 which can't write to tx_fifo if is const. Warning log: serial_xuartlite.c: In function 'uartlite_serial_putc': serial_xuartlite.c:60: warning: initialization discards qualifiers from pointer target type serial_xuartlite.c: In function 'uartlite_serial_getc': serial_xuartlite.c:78: warning: initialization discards qualifiers from pointer target type serial_xuartlite.c: In function 'uartlite_serial_tstc': serial_xuartlite.c:87: warning: initialization discards qualifiers from pointer target type Signed-off-by: Michal Simek --- There are several approach how to solve it in uartlite_serial_putc. 1. add retype to out_be32 function 2. retype in assignment 3. do not define userial_ports as const - used solution --- drivers/serial/serial_xuartlite.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/serial/serial_xuartlite.c b/drivers/serial/serial_xuartlite.c index 2dc6bd1..3a38f9e 100644 --- a/drivers/serial/serial_xuartlite.c +++ b/drivers/serial/serial_xuartlite.c @@ -40,7 +40,7 @@ struct uartlite { unsigned int status; }; -static const struct uartlite *userial_ports[4] = { +static struct uartlite *userial_ports[4] = { #ifdef XILINX_UARTLITE_BASEADDR [0] = (struct uartlite *)XILINX_UARTLITE_BASEADDR, #endif