]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
blktrace: fix endianness in get_pdu_int()
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Thu, 4 Jun 2020 07:13:29 +0000 (00:13 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:49:05 +0000 (17:49 +0200)
[ Upstream commit 71df3fd82e7cccec7b749a8607a4662d9f7febdd ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/trace/blktrace.c

index c6d59a457f50c5defdf8d8a8aca0be7893607fb5..cba2093edee22a1a5bfe3990421bbed0e5059374 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);
 }