aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/trace_output.c6
-rw-r--r--kernel/trace/trace_output.h5
2 files changed, 6 insertions, 5 deletions
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
index 6595074cbac5..d72b9a63b247 100644
--- a/kernel/trace/trace_output.c
+++ b/kernel/trace/trace_output.c
@@ -137,7 +137,7 @@ int trace_seq_putc(struct trace_seq *s, unsigned char c)
137 return 1; 137 return 1;
138} 138}
139 139
140int trace_seq_putmem(struct trace_seq *s, void *mem, size_t len) 140int trace_seq_putmem(struct trace_seq *s, const void *mem, size_t len)
141{ 141{
142 if (len > ((PAGE_SIZE - 1) - s->len)) 142 if (len > ((PAGE_SIZE - 1) - s->len))
143 return 0; 143 return 0;
@@ -148,10 +148,10 @@ int trace_seq_putmem(struct trace_seq *s, void *mem, size_t len)
148 return len; 148 return len;
149} 149}
150 150
151int trace_seq_putmem_hex(struct trace_seq *s, void *mem, size_t len) 151int trace_seq_putmem_hex(struct trace_seq *s, const void *mem, size_t len)
152{ 152{
153 unsigned char hex[HEX_CHARS]; 153 unsigned char hex[HEX_CHARS];
154 unsigned char *data = mem; 154 const unsigned char *data = mem;
155 int i, j; 155 int i, j;
156 156
157#ifdef __BIG_ENDIAN 157#ifdef __BIG_ENDIAN
diff --git a/kernel/trace/trace_output.h b/kernel/trace/trace_output.h
index 46fb9612d884..e0bde39c2dd9 100644
--- a/kernel/trace/trace_output.h
+++ b/kernel/trace/trace_output.h
@@ -31,8 +31,9 @@ extern ssize_t trace_seq_to_user(struct trace_seq *s, char __user *ubuf,
31 size_t cnt); 31 size_t cnt);
32extern int trace_seq_puts(struct trace_seq *s, const char *str); 32extern int trace_seq_puts(struct trace_seq *s, const char *str);
33extern int trace_seq_putc(struct trace_seq *s, unsigned char c); 33extern int trace_seq_putc(struct trace_seq *s, unsigned char c);
34extern int trace_seq_putmem(struct trace_seq *s, void *mem, size_t len); 34extern int trace_seq_putmem(struct trace_seq *s, const void *mem, size_t len);
35extern int trace_seq_putmem_hex(struct trace_seq *s, void *mem, size_t len); 35extern int trace_seq_putmem_hex(struct trace_seq *s, const void *mem,
36 size_t len);
36extern void *trace_seq_reserve(struct trace_seq *s, size_t len); 37extern void *trace_seq_reserve(struct trace_seq *s, size_t len);
37extern int trace_seq_path(struct trace_seq *s, struct path *path); 38extern int trace_seq_path(struct trace_seq *s, struct path *path);
38extern int seq_print_userip_objs(const struct userstack_entry *entry, 39extern int seq_print_userip_objs(const struct userstack_entry *entry,