[Skiboot] [PATCH 04/36] Fix sparse warning in trace repeat structure
Stewart Smith
stewart at linux.vnet.ibm.com
Tue Nov 10 15:17:58 AEDT 2015
core/trace.c:106:23: warning: incorrect type in assignment (different base types)
core/trace.c:106:23: expected restricted beint16_t [usertype] prev_len
core/trace.c:106:23: got int
Never read anywhere (by anyone), but silences a warning by doing the right thing.
Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
---
core/trace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/trace.c b/core/trace.c
index 7f06764c68b9..10b70bd6fb54 100644
--- a/core/trace.c
+++ b/core/trace.c
@@ -103,7 +103,7 @@ static bool handle_repeat(struct tracebuf *tb, const union trace *trace)
rpt->type = TRACE_REPEAT;
rpt->len_div_8 = sizeof(*rpt) >> 3;
rpt->cpu = trace->hdr.cpu;
- rpt->prev_len = trace->hdr.len_div_8 << 3;
+ rpt->prev_len = cpu_to_be16(trace->hdr.len_div_8 << 3);
rpt->num = cpu_to_be16(1);
lwsync(); /* write barrier: complete repeat record before exposing */
tb->end = cpu_to_be64(be64_to_cpu(tb->end) + sizeof(*rpt));
--
2.1.4
More information about the Skiboot
mailing list