* [U-Boot] [PATCH] FPGA: constify Lattice PFGA code
@ 2011-08-05 12:26 Wolfgang Denk
2011-08-05 12:29 ` [U-Boot] [PATCH v2] FPGA: constify Lattice FPGA code Wolfgang Denk
0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2011-08-05 12:26 UTC (permalink / raw)
To: u-boot
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 <wd@denx.de>
cc: Stefano Babic <sbabic@denx.de>
---
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 <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");
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);
--
1.7.6
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH v2] FPGA: constify Lattice FPGA code
2011-08-05 12:26 [U-Boot] [PATCH] FPGA: constify Lattice PFGA code Wolfgang Denk
@ 2011-08-05 12:29 ` Wolfgang Denk
2011-08-05 12:55 ` Stefano Babic
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Wolfgang Denk @ 2011-08-05 12:29 UTC (permalink / raw)
To: u-boot
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 <wd@denx.de>
cc: Stefano Babic <sbabic@denx.de>
---
v2: Fix typo in Subject:
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 <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");
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);
--
1.7.6
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH v2] FPGA: constify Lattice FPGA code
2011-08-05 12:29 ` [U-Boot] [PATCH v2] FPGA: constify Lattice FPGA code Wolfgang Denk
@ 2011-08-05 12:55 ` Stefano Babic
2011-08-30 17:54 ` Stefano Babic
2011-09-05 9:37 ` Wolfgang Denk
2 siblings, 0 replies; 6+ messages in thread
From: Stefano Babic @ 2011-08-05 12:55 UTC (permalink / raw)
To: u-boot
On 08/05/2011 02:29 PM, Wolfgang Denk 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 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 <wd@denx.de>
> cc: Stefano Babic <sbabic@denx.de>
Acked-by: Stefano Babic <sbabic@denx.de>
Best regards,
Stefano Babic
--
=====================================================================
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
=====================================================================
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH v2] FPGA: constify Lattice FPGA code
2011-08-05 12:29 ` [U-Boot] [PATCH v2] FPGA: constify Lattice FPGA code Wolfgang Denk
2011-08-05 12:55 ` Stefano Babic
@ 2011-08-30 17:54 ` Stefano Babic
2011-08-30 19:02 ` Wolfgang Denk
2011-09-05 9:37 ` Wolfgang Denk
2 siblings, 1 reply; 6+ messages in thread
From: Stefano Babic @ 2011-08-30 17:54 UTC (permalink / raw)
To: u-boot
On 08/05/2011 02:29 PM, Wolfgang Denk 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 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 <wd@denx.de>
> cc: Stefano Babic <sbabic@denx.de>
Applied to u-boot-imx (it was supposed to be merged into u-boot-imx,
right ?), thanks.
Best regards,
Stefano Babic
--
=====================================================================
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
=====================================================================
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH v2] FPGA: constify Lattice FPGA code
2011-08-30 17:54 ` Stefano Babic
@ 2011-08-30 19:02 ` Wolfgang Denk
0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2011-08-30 19:02 UTC (permalink / raw)
To: u-boot
Dear Stefano Babic,
In message <4E5D23C6.3050208@denx.de> you wrote:
> On 08/05/2011 02:29 PM, Wolfgang Denk 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 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 <wd@denx.de>
> > cc: Stefano Babic <sbabic@denx.de>
>
> 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
--
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. Dijkstra
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH v2] FPGA: constify Lattice FPGA code
2011-08-05 12:29 ` [U-Boot] [PATCH v2] FPGA: constify Lattice FPGA code Wolfgang Denk
2011-08-05 12:55 ` Stefano Babic
2011-08-30 17:54 ` Stefano Babic
@ 2011-09-05 9:37 ` Wolfgang Denk
2 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2011-09-05 9:37 UTC (permalink / raw)
To: u-boot
Dear Wolfgang Denk,
In message <1312547354-20051-1-git-send-email-wd@denx.de> 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 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 <wd@denx.de>
> cc: Stefano Babic <sbabic@denx.de>
> ---
> 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
--
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-09-05 9:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-05 12:26 [U-Boot] [PATCH] FPGA: constify Lattice PFGA code Wolfgang Denk
2011-08-05 12:29 ` [U-Boot] [PATCH v2] FPGA: constify Lattice FPGA code Wolfgang Denk
2011-08-05 12:55 ` Stefano Babic
2011-08-30 17:54 ` Stefano Babic
2011-08-30 19:02 ` Wolfgang Denk
2011-09-05 9:37 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox