]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.19/usb-dwc3-trace-add-missing-break-statement-to-make-c.patch
autosel patches for 4.19
[thirdparty/kernel/stable-queue.git] / queue-4.19 / usb-dwc3-trace-add-missing-break-statement-to-make-c.patch
1 From 1a016ab0f2132ce3fbd5f391ce6afa75d2d34c44 Mon Sep 17 00:00:00 2001
2 From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
3 Date: Mon, 3 Dec 2018 11:28:47 +0200
4 Subject: usb: dwc3: trace: add missing break statement to make compiler happy
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 [ Upstream commit 54d48183d21e03f780053d7129312049cb5dd591 ]
10
11 The missed break statement in the outer switch makes the code fall through
12 always and thus always same value will be printed.
13
14 Besides that, compiler warns about missed fall through marker:
15
16 drivers/usb/dwc3/./trace.h: In function ‘trace_raw_output_dwc3_log_trb’:
17 drivers/usb/dwc3/./trace.h:246:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
18 switch (pcm) {
19 ^~~~~~
20
21 Add the missing break statement to work correctly without compilation
22 warnings.
23
24 Fixes: fa8d965d736b ("usb: dwc3: trace: pretty print high-bandwidth transfers too")
25 Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
26 Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
27 Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
28 Signed-off-by: Sasha Levin <sashal@kernel.org>
29 ---
30 drivers/usb/dwc3/trace.h | 2 ++
31 1 file changed, 2 insertions(+)
32
33 diff --git a/drivers/usb/dwc3/trace.h b/drivers/usb/dwc3/trace.h
34 index f22714cce070..f27c5cbe285c 100644
35 --- a/drivers/usb/dwc3/trace.h
36 +++ b/drivers/usb/dwc3/trace.h
37 @@ -251,9 +251,11 @@ DECLARE_EVENT_CLASS(dwc3_log_trb,
38 s = "2x ";
39 break;
40 case 3:
41 + default:
42 s = "3x ";
43 break;
44 }
45 + break;
46 default:
47 s = "";
48 } s; }),
49 --
50 2.19.1
51