Skip to content
Snippets Groups Projects
Commit bda32ffc authored by Simon Glass's avatar Simon Glass
Browse files

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: default avatarSimon Glass <sjg@chromium.org>
parent 6b3ff98d
No related branches found
No related tags found
No related merge requests found
......@@ -270,7 +270,8 @@ int cpu_init(void);
phys_size_t initdram (int);
int display_options (void);
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 */
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 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 */
union linebuf {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment