From d143b9518df941db267e5b17f23e64eea7b7682a Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 30 Dec 2020 15:23:04 +0100 Subject: [PATCH] Revert "seq_buf: Avoid type mismatch for seq_buf_init" This reverts commit 0e724f2e80ba23afaada081528c13950bdb4630e which is commit d9a9280a0d0ae51dc1d4142138b99242b7ec8ac6 upstream. It breaks the abi definitions, and there's no real need for it at all other than for "correctness", so revert the thing. Bug: 161946584 Signed-off-by: Greg Kroah-Hartman Change-Id: I20ccc2690eca2c16adf507d679fa5e0a6c746e1c --- include/linux/seq_buf.h | 2 +- include/linux/trace_seq.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/seq_buf.h b/include/linux/seq_buf.h index 7cc952282e8b..aa5deb041c25 100644 --- a/include/linux/seq_buf.h +++ b/include/linux/seq_buf.h @@ -30,7 +30,7 @@ static inline void seq_buf_clear(struct seq_buf *s) } static inline void -seq_buf_init(struct seq_buf *s, char *buf, unsigned int size) +seq_buf_init(struct seq_buf *s, unsigned char *buf, unsigned int size) { s->buffer = buf; s->size = size; diff --git a/include/linux/trace_seq.h b/include/linux/trace_seq.h index 6db257466af6..6609b39a7232 100644 --- a/include/linux/trace_seq.h +++ b/include/linux/trace_seq.h @@ -12,7 +12,7 @@ */ struct trace_seq { - char buffer[PAGE_SIZE]; + unsigned char buffer[PAGE_SIZE]; struct seq_buf seq; int full; }; @@ -51,7 +51,7 @@ static inline int trace_seq_used(struct trace_seq *s) * that is about to be written to and then return the result * of that write. */ -static inline char * +static inline unsigned char * trace_seq_buffer_ptr(struct trace_seq *s) { return s->buffer + seq_buf_used(&s->seq);