mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
Update print_buffer() to use const
The buffer cannot be changed by this function, so change the buffer pointer to a const. This allows callers with const pointer to use the function without a cast. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
6b3ff98da4
commit
bda32ffcf7
2 changed files with 4 additions and 2 deletions
|
@ -270,7 +270,8 @@ int cpu_init(void);
|
||||||
phys_size_t initdram (int);
|
phys_size_t initdram (int);
|
||||||
int display_options (void);
|
int display_options (void);
|
||||||
void print_size(unsigned long long, const char *);
|
void print_size(unsigned long long, const char *);
|
||||||
int print_buffer (ulong addr, void* data, uint width, uint count, uint linelen);
|
int print_buffer(ulong addr, const void *data, uint width, uint count,
|
||||||
|
uint linelen);
|
||||||
|
|
||||||
/* common/main.c */
|
/* common/main.c */
|
||||||
void main_loop (void);
|
void main_loop (void);
|
||||||
|
|
|
@ -98,7 +98,8 @@ void print_size(unsigned long long size, const char *s)
|
||||||
*/
|
*/
|
||||||
#define MAX_LINE_LENGTH_BYTES (64)
|
#define MAX_LINE_LENGTH_BYTES (64)
|
||||||
#define DEFAULT_LINE_LENGTH_BYTES (16)
|
#define DEFAULT_LINE_LENGTH_BYTES (16)
|
||||||
int print_buffer (ulong addr, void* data, uint width, uint count, uint linelen)
|
int print_buffer(ulong addr, const void *data, uint width, uint count,
|
||||||
|
uint linelen)
|
||||||
{
|
{
|
||||||
/* linebuf as a union causes proper alignment */
|
/* linebuf as a union causes proper alignment */
|
||||||
union linebuf {
|
union linebuf {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue