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>
(cherry picked from commit 1cc0ad510a)
This commit is contained in:
Shaun Ruffell 2015-03-02 09:00:13 -06:00 committed by Russ Meyerriecks
parent 701f633e0d
commit a3da9f1d03

View File

@ -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 */