]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/2.6.32.3/dma-debug-fix-bug-causing-build-warning.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 2.6.32.3 / dma-debug-fix-bug-causing-build-warning.patch
1 From a8fe9ea200ea21421ea750423d1d4d4f7ce037cf Mon Sep 17 00:00:00 2001
2 From: Ingo Molnar <mingo@elte.hu>
3 Date: Thu, 31 Dec 2009 15:16:23 +0100
4 Subject: dma-debug: Fix bug causing build warning
5
6 From: Ingo Molnar <mingo@elte.hu>
7
8 commit a8fe9ea200ea21421ea750423d1d4d4f7ce037cf upstream.
9
10 Stephen Rothwell reported the following build warning:
11
12 lib/dma-debug.c: In function 'dma_debug_device_change':
13 lib/dma-debug.c:680: warning: 'return' with no value, in function returning non-void
14
15 Introduced by commit f797d9881b62c2ddb1d2e7bd80d87141949c84aa
16 ("dma-debug: Do not add notifier when dma debugging is disabled").
17
18 Return 0 [notify-done] when disabled. (this is standard bus notifier behavior.)
19
20 Signed-off-by: Shaun Ruffell <sruffell@digium.com>
21 Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
22 Cc: Linus Torvalds <torvalds@linux-foundation.org>
23 LKML-Reference: <20091231125624.GA14666@liondog.tnic>
24 Signed-off-by: Ingo Molnar <mingo@elte.hu>
25 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
26
27 ---
28 lib/dma-debug.c | 5 ++---
29 1 file changed, 2 insertions(+), 3 deletions(-)
30
31 --- a/lib/dma-debug.c
32 +++ b/lib/dma-debug.c
33 @@ -670,14 +670,13 @@ static int device_dma_allocations(struct
34 return count;
35 }
36
37 -static int dma_debug_device_change(struct notifier_block *nb,
38 - unsigned long action, void *data)
39 +static int dma_debug_device_change(struct notifier_block *nb, unsigned long action, void *data)
40 {
41 struct device *dev = data;
42 int count;
43
44 if (global_disable)
45 - return;
46 + return 0;
47
48 switch (action) {
49 case BUS_NOTIFY_UNBOUND_DRIVER: