diff options
author | Markos Chandras <markos.chandras@imgtec.com> | 2013-06-17 09:00:36 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2013-06-21 12:07:02 -0400 |
commit | 39b6f3aa1979ad7df42474d3c63bbc7e25bd31e4 (patch) | |
tree | 62b58ff6f5a4c70def49904106a790bd2b3d8727 /arch/mips | |
parent | 0156915cc0202e87cac1c8507b2b71eb899a9652 (diff) |
MIPS: sibyte: Declare the cfe_write() buffer as constant
The write() prototype expects a const char * as argument so declare
it as such.
Fixes the following build problem:
arch/mips/sibyte/common/cfe_console.c:23:5: error: passing argument 2 of
'cfe_write' discards 'const' qualifier from pointer target type [-Werror]
arch/mips/sibyte/common/cfe_console.c:34:4: error: passing argument 2 of
'cfe_write' makes pointer from integer without a cast [-Werror]
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Acked-by: Steven J. Hill <Steven.Hill@imgtec.com>
Cc: sibyte-users@bitmover.com
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5485/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/fw/cfe/cfe_api.c | 4 | ||||
-rw-r--r-- | arch/mips/include/asm/fw/cfe/cfe_api.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/arch/mips/fw/cfe/cfe_api.c b/arch/mips/fw/cfe/cfe_api.c index d06dc5a6b8d3..cf84f01931c5 100644 --- a/arch/mips/fw/cfe/cfe_api.c +++ b/arch/mips/fw/cfe/cfe_api.c | |||
@@ -406,12 +406,12 @@ int cfe_setenv(char *name, char *val) | |||
406 | return xiocb.xiocb_status; | 406 | return xiocb.xiocb_status; |
407 | } | 407 | } |
408 | 408 | ||
409 | int cfe_write(int handle, unsigned char *buffer, int length) | 409 | int cfe_write(int handle, const char *buffer, int length) |
410 | { | 410 | { |
411 | return cfe_writeblk(handle, 0, buffer, length); | 411 | return cfe_writeblk(handle, 0, buffer, length); |
412 | } | 412 | } |
413 | 413 | ||
414 | int cfe_writeblk(int handle, s64 offset, unsigned char *buffer, int length) | 414 | int cfe_writeblk(int handle, s64 offset, const char *buffer, int length) |
415 | { | 415 | { |
416 | struct cfe_xiocb xiocb; | 416 | struct cfe_xiocb xiocb; |
417 | 417 | ||
diff --git a/arch/mips/include/asm/fw/cfe/cfe_api.h b/arch/mips/include/asm/fw/cfe/cfe_api.h index 17347551a1b2..a0ea69e91e2e 100644 --- a/arch/mips/include/asm/fw/cfe/cfe_api.h +++ b/arch/mips/include/asm/fw/cfe/cfe_api.h | |||
@@ -115,8 +115,8 @@ int cfe_read(int handle, unsigned char *buffer, int length); | |||
115 | int cfe_readblk(int handle, int64_t offset, unsigned char *buffer, | 115 | int cfe_readblk(int handle, int64_t offset, unsigned char *buffer, |
116 | int length); | 116 | int length); |
117 | int cfe_setenv(char *name, char *val); | 117 | int cfe_setenv(char *name, char *val); |
118 | int cfe_write(int handle, unsigned char *buffer, int length); | 118 | int cfe_write(int handle, const char *buffer, int length); |
119 | int cfe_writeblk(int handle, int64_t offset, unsigned char *buffer, | 119 | int cfe_writeblk(int handle, int64_t offset, const char *buffer, |
120 | int length); | 120 | int length); |
121 | 121 | ||
122 | #endif /* CFE_API_H */ | 122 | #endif /* CFE_API_H */ |