lkml.org 
[lkml]   [2009]   [Dec]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[tip:x86/urgent] dma-debug: Fix bug causing build warning
Commit-ID:  a8fe9ea200ea21421ea750423d1d4d4f7ce037cf
Gitweb: http://git.kernel.org/tip/a8fe9ea200ea21421ea750423d1d4d4f7ce037cf
Author: Ingo Molnar <mingo@elte.hu>
AuthorDate: Thu, 31 Dec 2009 15:16:23 +0100
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Thu, 31 Dec 2009 15:16:23 +0100

dma-debug: Fix bug causing build warning

Stephen Rothwell reported the following build warning:

lib/dma-debug.c: In function 'dma_debug_device_change':
lib/dma-debug.c:680: warning: 'return' with no value, in function returning non-void

Introduced by commit f797d9881b62c2ddb1d2e7bd80d87141949c84aa
("dma-debug: Do not add notifier when dma debugging is disabled").

Return 0 [notify-done] when disabled. (this is standard bus notifier behavior.)

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: <stable@kernel.org>
LKML-Reference: <20091231125624.GA14666@liondog.tnic>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
lib/dma-debug.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/dma-debug.c b/lib/dma-debug.c
index 7399744..cf90620 100644
--- a/lib/dma-debug.c
+++ b/lib/dma-debug.c
@@ -670,14 +670,13 @@ static int device_dma_allocations(struct device *dev)
return count;
}

-static int dma_debug_device_change(struct notifier_block *nb,
- unsigned long action, void *data)
+static int dma_debug_device_change(struct notifier_block *nb, unsigned long action, void *data)
{
struct device *dev = data;
int count;

if (global_disable)
- return;
+ return 0;

switch (action) {
case BUS_NOTIFY_UNBOUND_DRIVER:

\
 
 \ /
  Last update: 2009-12-31 15:35    [W:0.050 / U:1.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site