45 lines
1.5 KiB
Diff
45 lines
1.5 KiB
Diff
From 1cc0ad510acd404e63923ed3062b9302d53580da Mon Sep 17 00:00:00 2001
|
|
From: Shaun Ruffell <sruffell@digium.com>
|
|
Date: Mon, 2 Mar 2015 09:00:13 -0600
|
|
Subject: [PATCH] dahdi: Fix "void value not ignored..." error when compiling
|
|
against kernel 4.0.
|
|
|
|
With commit (d1f1052c52 "device: Change dev_<level> logging functions to return
|
|
void") [1] in kernel version 4.0, DAHDI would fail to compile with the following
|
|
error:
|
|
|
|
.../drivers/dahdi/dahdi-base.c:7150:2: error: void value not ignored as it ought to be
|
|
dahdi_dev_dbg(ASSIGN, span_device(span),
|
|
^
|
|
|
|
Now ignore the dev_printk return value.
|
|
|
|
[1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d1f1052c5204524
|
|
|
|
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
|
|
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
|
|
---
|
|
include/dahdi/kernel.h | 6 ++++--
|
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h
|
|
index 365801d..54c415e 100644
|
|
--- a/include/dahdi/kernel.h
|
|
+++ b/include/dahdi/kernel.h
|
|
@@ -1665,9 +1665,11 @@ struct mutex {
|
|
chan_printk(DEBUG, "-" #bits, chan, \
|
|
"%s: " fmt, __func__, ## __VA_ARGS__)))
|
|
#define dahdi_dev_dbg(bits, dev, fmt, ...) \
|
|
- ((void)((debug & (DAHDI_DBG_ ## bits)) && \
|
|
+ do { if (debug & (DAHDI_DBG_ ## bits)) { \
|
|
dev_printk(KERN_DEBUG, dev, \
|
|
- "DBG-%s(%s): " fmt, #bits, __func__, ## __VA_ARGS__)))
|
|
+ "DBG-%s(%s): " fmt, #bits, __func__, ## __VA_ARGS__); \
|
|
+ } } while (0)
|
|
+
|
|
#endif /* DAHDI_PRINK_MACROS_USE_debug */
|
|
|
|
#endif /* _DAHDI_KERNEL_H */
|
|
--
|
|
2.3.4
|
|
|