]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 13 Nov 2019 23:47:34 +0000 (18:47 -0500)
commit9f2fa589405f7e079c2de6a964d6899c69fbc7f8
tree7483278abb53e4a06b82b4926c97553c20a4a447
parenta2fe1dc701542ebf1c241d03e197500b71eafd94
usb: xhci: fix __le32/__le64 accessors in debugfs code

BugLink: https://bugs.launchpad.net/bugs/1852492
commit d5501d5c29a2e684640507cfee428178d6fd82ca upstream.

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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/usb/host/xhci-debugfs.c