usb: xhci: fix __le32/__le64 accessors in debugfs code
authorBen Dooks (Codethink) <ben.dooks@codethink.co.uk>
Fri, 25 Oct 2019 14:30:29 +0000 (17:30 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Oct 2019 16:47:08 +0000 (17:47 +0100)
commitd5501d5c29a2e684640507cfee428178d6fd82ca
tree418826205e441cd599731d2a96eb046782aca02f
parentbfa3dbb343f664573292afb9e44f9abeb81a19de
usb: xhci: fix __le32/__le64 accessors in debugfs code

It looks like some of the xhci debug code is passing u32 to functions
directly from __le32/__le64 fields.
Fix this by using le{32,64}_to_cpu() on these to fix the following
sparse warnings;

xhci-debugfs.c:205:62: warning: incorrect type in argument 1 (different base types)
xhci-debugfs.c:205:62:    expected unsigned int [usertype] field0
xhci-debugfs.c:205:62:    got restricted __le32
xhci-debugfs.c:206:62: warning: incorrect type in argument 2 (different base types)
xhci-debugfs.c:206:62:    expected unsigned int [usertype] field1
xhci-debugfs.c:206:62:    got restricted __le32
...

[Trim down commit message, sparse warnings were similar -Mathias]
Cc: <stable@vger.kernel.org> # 4.15+
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/1572013829-14044-4-git-send-email-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-debugfs.c