From patchwork Fri Aug 5 12:26:31 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfgang Denk X-Patchwork-Id: 108645 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 D1EFBB6F71 for ; Fri, 5 Aug 2011 22:26:47 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6050E280A4; Fri, 5 Aug 2011 14:26:45 +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 D7zgmP2UfnTW; Fri, 5 Aug 2011 14:26:45 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 375F6280AB; Fri, 5 Aug 2011 14:26:43 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5CB39280AB for ; Fri, 5 Aug 2011 14:26:40 +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 ilVwFa7GNUvp for ; Fri, 5 Aug 2011 14:26:38 +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-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by theia.denx.de (Postfix) with ESMTP id 33A34280A4 for ; Fri, 5 Aug 2011 14:26:36 +0200 (CEST) Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id E8227188A174; Fri, 5 Aug 2011 14:26:33 +0200 (CEST) X-Auth-Info: I1d7tQOcVGTccJdl8gncHzHUuoR7+sDth7kDBq9Fwaw= Received: from diddl.denx.de (host-80-81-18-216.customer.m-online.net [80.81.18.216]) by smtp-auth.mnet-online.de (Postfix) with ESMTPA id 166811C00131; Fri, 5 Aug 2011 14:26:34 +0200 (CEST) Received: from gemini.denx.de (unknown [10.0.0.2]) by diddl.denx.de (Postfix) with ESMTP id E5EFAC913109; Fri, 5 Aug 2011 14:26:33 +0200 (CEST) Received: by gemini.denx.de (Postfix, from userid 500) id BA2111208DCE; Fri, 5 Aug 2011 14:26:33 +0200 (CEST) From: Wolfgang Denk To: u-boot@lists.denx.de Date: Fri, 5 Aug 2011 14:26:31 +0200 Message-Id: <1312547191-20590-1-git-send-email-wd@denx.de> X-Mailer: git-send-email 1.7.6 Subject: [U-Boot] [PATCH] FPGA: constify Lattice PFGA code 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 The Lattice code was missed by commit e6a857d "fpga: constify to fix build warning" resulting in such warnings: fpga.c: In function 'fpga_load': fpga.c:238: warning: passing argument 2 of 'lattice_load' discards qualifiers from pointer target type fpga.c: In function 'fpga_dump': fpga.c:278: warning: passing argument 2 of 'lattice_dump' discards qualifiers from pointer target type Signed-off-by: Wolfgang Denk cc: Stefano Babic --- drivers/fpga/lattice.c | 6 +++--- include/lattice.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/fpga/lattice.c b/drivers/fpga/lattice.c index c3b2355..50d9e54 100644 --- a/drivers/fpga/lattice.c +++ b/drivers/fpga/lattice.c @@ -34,7 +34,7 @@ #include static lattice_board_specific_func *pfns; -static char *fpga_image; +static const char *fpga_image; static unsigned long read_bytes; static unsigned long bufsize; static unsigned short expectedCRC; @@ -302,7 +302,7 @@ static int lattice_validate(Lattice_desc *desc, const char *fn) return ret_val; } -int lattice_load(Lattice_desc *desc, void *buf, size_t bsize) +int lattice_load(Lattice_desc *desc, const void *buf, size_t bsize) { int ret_val = FPGA_FAIL; @@ -335,7 +335,7 @@ int lattice_load(Lattice_desc *desc, void *buf, size_t bsize) return ret_val; } -int lattice_dump(Lattice_desc *desc, void *buf, size_t bsize) +int lattice_dump(Lattice_desc *desc, const void *buf, size_t bsize) { puts("Dump not supported for Lattice FPGA\n"); diff --git a/include/lattice.h b/include/lattice.h index e965663..6a2cf93 100755 --- a/include/lattice.h +++ b/include/lattice.h @@ -302,8 +302,8 @@ void sclock(void); void ispVMDelay(unsigned short int a_usMicroSecondDelay); void calibration(void); -int lattice_load(Lattice_desc *desc, void *buf, size_t bsize); -int lattice_dump(Lattice_desc *desc, void *buf, size_t bsize); +int lattice_load(Lattice_desc *desc, const void *buf, size_t bsize); +int lattice_dump(Lattice_desc *desc, const void *buf, size_t bsize); int lattice_info(Lattice_desc *desc); void ispVMStart(void);