blktrace: fix endianness in get_pdu_int()
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Thu, 4 Jun 2020 07:13:29 +0000 (00:13 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 5 Jun 2020 03:23:38 +0000 (21:23 -0600)
In function get_pdu_len() replace variable type from __u64 to
__be64. This fixes sparse warning.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
kernel/trace/blktrace.c

index e2013bd0e2a631842a37fe73ec5df9f97ae04f79..f857b4684bebec57f929a17852711f96b0a80bc1 100644 (file)
@@ -1256,7 +1256,7 @@ static inline __u16 t_error(const struct trace_entry *ent)
 
 static __u64 get_pdu_int(const struct trace_entry *ent, bool has_cg)
 {
-       const __u64 *val = pdu_start(ent, has_cg);
+       const __be64 *val = pdu_start(ent, has_cg);
        return be64_to_cpu(*val);
 }