Skip to contentSkip to conversation

dmaengine: ste_dma40: fix unneeded variable warning

PATCH New Sasha Levin 1 participant 4 messages Aug 20, 2019

Subsystems (5)
lore
Share & tools
lore

Sasha Levin

author maintainer
#0 lore raw

PATCH 1/4 dmaengine: ste_dma40: fix unneeded variable warning

From: Arnd Bergmann <[email protected]>

[ Upstream commit 5d6fb560729a5d5554e23db8d00eb57cd0021083 ]

clang-9 points out that there are two variables that depending on the configuration may only be used in an ARRAY_SIZE() expression but not referenced:

drivers/dma/ste_dma40.c:145:12: error: variable 'd40_backup_regs' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]

static u32 d40_backup_regs[] = {
           ^

drivers/dma/ste_dma40.c:214:12: error: variable 'd40_backup_regs_chan' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration] static u32 d40_backup_regs_chan[] = {

Mark these __maybe_unused to shut up the warning.

---
 drivers/dma/ste_dma40.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/dma/ste_dma40.c +2 -2
index dd3e7ba273ad0..0fede051f4e1c 100644
@@ -142,7 +142,7 @@ enum d40_events {
  * when the DMA hw is powered off.
  * TODO: Add save/restore of D40_DREG_GCC on dma40 v3 or later, if that works.
  */
-static u32 d40_backup_regs[] = {
+static __maybe_unused u32 d40_backup_regs[] = {
 	D40_DREG_LCPA,
 	D40_DREG_LCLA,
 	D40_DREG_PRMSE,
@@ -211,7 +211,7 @@ static u32 d40_backup_regs_v4b[] = {
 
 #define BACKUP_REGS_SZ_V4B ARRAY_SIZE(d40_backup_regs_v4b)
 
-static u32 d40_backup_regs_chan[] = {
+static __maybe_unused u32 d40_backup_regs_chan[] = {
 	D40_CHAN_REG_SSCFG,
 	D40_CHAN_REG_SSELT,
 	D40_CHAN_REG_SSPTR,
Signature · 1 line
2.20.1
author maintainer
#1 lore raw

PATCH 2/4 usb: gadget: composite: Clear "suspended" on reset/disconnect

From: Benjamin Herrenschmidt <[email protected]>

[ Upstream commit 602fda17c7356bb7ae98467d93549057481d11dd ]

In some cases, one can get out of suspend with a reset or a disconnect followed by a reconnect. Previously we would leave a stale suspended flag set.

---
 drivers/usb/gadget/composite.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/gadget/composite.c +1 -0
index 8bf54477f4724..351a406b97af7 100644
@@ -1889,6 +1889,7 @@ void composite_disconnect(struct usb_gadget *gadget)
 	 * disconnect callbacks?
 	 */
 	spin_lock_irqsave(&cdev->lock, flags);
+	cdev->suspended = 0;
 	if (cdev->config)
 		reset_config(cdev);
 	if (cdev->driver->disconnect)
Signature · 1 line
2.20.1
author maintainer
#2 lore raw

PATCH 3/4 usb: host: fotg2: restart hcd after port reset

In reply to Sasha Levin

From: Hans Ulli Kroll <[email protected]>

[ Upstream commit 777758888ffe59ef754cc39ab2f275dc277732f4 ]

On the Gemini SoC the FOTG2 stalls after port reset so restart the HCD after each port reset.

---
 drivers/usb/host/fotg210-hcd.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/usb/host/fotg210-hcd.c +4 -0
index 2341af4f34909..11b3a8c57eabc 100644
@@ -1653,6 +1653,10 @@ static int fotg210_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
 			/* see what we found out */
 			temp = check_reset_complete(fotg210, wIndex, status_reg,
 					fotg210_readl(fotg210, status_reg));
+
+			/* restart schedule */
+			fotg210->command |= CMD_RUN;
+			fotg210_writel(fotg210, fotg210->command, &fotg210->regs->command);
 		}
 
 		if (!(temp & (PORT_RESUME|PORT_RESET))) {
Signature · 1 line
2.20.1
author maintainer
#3 lore raw

PATCH 4/4 tools: hv: fix KVP and VSS daemons exit code

In reply to Sasha Levin

From: Adrian Vladu <[email protected]>

[ Upstream commit b0995156071b0ff29a5902964a9dc8cfad6f81c0 ]

HyperV KVP and VSS daemons should exit with 0 when the '--help' or '-h' flags are used.

Cc "K. Y. Srinivasan" <[email protected]>
Cc Haiyang Zhang <[email protected]>
Cc Stephen Hemminger <[email protected]>
Cc Sasha Levin <[email protected]>
Cc Alessandro Pilotti <[email protected]>
---
 tools/hv/hv_kvp_daemon.c | 2 ++
 tools/hv/hv_vss_daemon.c | 2 ++
 2 files changed, 4 insertions(+)
tools/hv/hv_kvp_daemon.c +2 -0
index 1774800668168..fffc7c4184599 100644
@@ -1379,6 +1379,8 @@ int main(int argc, char *argv[])
 			daemonize = 0;
 			break;
 		case 'h':
+			print_usage(argv);
+			exit(0);
 		default:
 			print_usage(argv);
 			exit(EXIT_FAILURE);
tools/hv/hv_vss_daemon.c +2 -0
index 5d51d6ff08e6a..b5465f92ed50e 100644
@@ -164,6 +164,8 @@ int main(int argc, char *argv[])
 			daemonize = 0;
 			break;
 		case 'h':
+			print_usage(argv);
+			exit(0);
 		default:
 			print_usage(argv);
 			exit(EXIT_FAILURE);
Signature · 1 line
2.20.1