From eacccbda431c4eff9073f2b4abfaba88524cd12f Mon Sep 17 00:00:00 2001 From: "Gustavo A. R. Silva" Date: Sat, 20 Jan 2018 02:37:31 -0600 Subject: usb: xhci: Fix bool initialization in xhci_bulk_tx Bool initializations should use true and false. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Cc: Bin Meng Cc: Marek Vasut --- drivers/usb/host/xhci-ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/usb') diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 579e6707eb..7599c9183a 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -557,7 +557,7 @@ int xhci_bulk_tx(struct usb_device *udev, unsigned long pipe, { int num_trbs = 0; struct xhci_generic_trb *start_trb; - bool first_trb = 0; + bool first_trb = false; int start_cycle; u32 field = 0; u32 length_field = 0; -- cgit From 6f7c92db4c7d1e45503fb10e60caa1ec2bb18d10 Mon Sep 17 00:00:00 2001 From: Daniel Schwierzeck Date: Thu, 25 Jan 2018 20:43:58 +0100 Subject: usb: ehci: mxs: fix swapped argument in ehci_writel() ehci_writel() swaps the arguments for address and value. One call in ehci-mxs ignores that. This fixes the warning: drivers/usb/host/ehci-mxs.c: In function ?ehci_hcd_stop?: drivers/usb/host/ehci-mxs.c:159:19: error: initialization makes integer from pointer without a cast [-Werror=int-conversion] ehci_writel(tmp, &hcor->or_usbcmd); ^ arch/arm/include/asm/io.h:117:34: note: in definition of macro ?writel? #define writel(v,c) ({ u32 __v = v; __iowmb(); __arch_putl(__v,c); __v; }) ^ drivers/usb/host/ehci-mxs.c:159:2: note: in expansion of macro ?ehci_writel? ^~~~~~~~~~~ Signed-off-by: Daniel Schwierzeck --- drivers/usb/host/ehci-mxs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/usb') diff --git a/drivers/usb/host/ehci-mxs.c b/drivers/usb/host/ehci-mxs.c index 6b8d969bb0..9872415562 100644 --- a/drivers/usb/host/ehci-mxs.c +++ b/drivers/usb/host/ehci-mxs.c @@ -156,7 +156,7 @@ int ehci_hcd_stop(int index) tmp = ehci_readl(&hcor->or_usbcmd); tmp &= ~CMD_RUN; - ehci_writel(tmp, &hcor->or_usbcmd); + ehci_writel(&hcor->or_usbcmd, tmp); /* Disable the PHY */ tmp = USBPHY_PWD_RXPWDRX | USBPHY_PWD_RXPWDDIFF | -- cgit