FPGA: constify Lattice PFGA code
PATCH 1/1 FPGA: constify Lattice PFGA code
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
--- drivers/fpga/lattice.c | 6 +++--- include/lattice.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/fpga/lattice.c +3 -3
@@ -34,7 +34,7 @@#include <lattice.h> 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" );
include/lattice.h +2 -2
@@ -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 );
Signature · 1 line
1.7.6
PATCH v2 1/1 FPGA: constify Lattice FPGA code
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
---
v2: Fix typo in Subject:
drivers/fpga/lattice.c | 6 +++--- include/lattice.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/fpga/lattice.c +3 -3
@@ -34,7 +34,7 @@#include <lattice.h> 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" );
include/lattice.h +2 -2
@@ -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 );
Signature · 1 line
1.7.6
PATCH v2 1/1 FPGA: constify Lattice FPGA code
Quoted 10 lines · Wolfgang Denk
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 typefpga.c: In function 'fpga_dump':
fpga.c:278: warning: passing argument 2 of 'lattice_dump' discards qualifiers from pointer target typeSigned-off-by Wolfgang Denk <[email protected]>cc Stefano Babic <[email protected]>
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================
PATCH v2 1/1 FPGA: constify Lattice FPGA code
In reply to Wolfgang DenkQuoted 10 lines · Wolfgang Denk
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 typefpga.c: In function 'fpga_dump':
fpga.c:278: warning: passing argument 2 of 'lattice_dump' discards qualifiers from pointer target typeSigned-off-by Wolfgang Denk <[email protected]>cc Stefano Babic <[email protected]>
Applied to u-boot-imx (it was supposed to be merged into u-boot-imx, right ?), thanks.
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================
PATCH v2 1/1 FPGA: constify Lattice FPGA code
Dear Stefano Babic,
Quoted 9 lines · In message <[email protected]> you wrote:
Quoted 8 lines · Wolfgang Denk
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 typefpga.c: In function 'fpga_dump':
fpga.c:278: warning: passing argument 2 of 'lattice_dump' discards qualifiers from pointer target type
Quoted 5 lines
Quoted 2 lines
Signed-off-by Wolfgang Denk <[email protected]>cc Stefano Babic <[email protected]>Applied to u-boot-imx (it was supposed to be merged into u-boot-imx, right ?), thanks.
Well, actually this is generic code that has nothing to do with i.MX so I intended to pull this myself once a little time had passed to allow for review comments.
But now you applied it, let's keep it as is.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"The question of whether a computer can think is no more interesting
than the question of whether a submarine can swim"
- Edsgar W. DijkstraWolfgang Denk
AppliedPATCH v2 1/1 FPGA: constify Lattice FPGA code
In reply to Wolfgang DenkDear Wolfgang Denk,
Quoted 8 lines · In message <[email protected]> you wrote:
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 typefpga.c: In function 'fpga_dump':
fpga.c:278: warning: passing argument 2 of 'lattice_dump' discards qualifiers from pointer target type
Quoted 8 lines
Signed-off-by Wolfgang Denk <[email protected]>cc Stefano Babic <[email protected]>---
v2: Fix typo in Subject:drivers/fpga/lattice.c | 6 +++--- include/lattice.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de When some people discover the truth, they just can't understand why everybody isn't eager to hear it.