[dahdi-commits] dahdi/linux.git branch "master" updated.

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Mon Mar 2 05:08:08 CST 2015


branch "master" has been updated
       via  1559db9d1ae03780788788c07334ca54cdd1253a (commit)
       via  1cc0ad510acd404e63923ed3062b9302d53580da (commit)
      from  4d86a8f3f690ee9bb9429e17cc03856c6c2dc760 (commit)

Summary of changes:
 drivers/dahdi/xpp/card_pri.c |    6 +++---
 include/dahdi/kernel.h       |    8 ++++++--
 2 files changed, 9 insertions(+), 5 deletions(-)


- Log -----------------------------------------------------------------
commit 1559db9d1ae03780788788c07334ca54cdd1253a
Author: Shaun Ruffell <sruffell at digium.com>
Date:   Mon Mar 2 09:00:14 2015 -0600

    dahdi: strnicmp() -> strncasecmp()
    
    With commit (af3cd13501 "lib/string.c: remove strnicmp()") [1] dahdi can no
    longer call strnicmp directly. strncasecmp was added into lib/string.c in kernel
    version 2.6.22 so we'll map calls to strncasecmp to strnicmp for any kernel
    before that.
    
    This is necessary to compile against kernels >= 4.0.
    
    [1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=af3cd13501
    
    Signed-off-by: Shaun Ruffell <sruffell at digium.com>
    Acked-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>

diff --git a/drivers/dahdi/xpp/card_pri.c b/drivers/dahdi/xpp/card_pri.c
index 29b457b..edc8bd2 100644
--- a/drivers/dahdi/xpp/card_pri.c
+++ b/drivers/dahdi/xpp/card_pri.c
@@ -2399,11 +2399,11 @@ static DEVICE_ATTR_WRITER(pri_protocol_store, dev, buf, count)
 			buf, i);
 		return -EINVAL;
 	}
-	if (strnicmp(buf, "E1", 2) == 0)
+	if (strncasecmp(buf, "E1", 2) == 0)
 		new_protocol = PRI_PROTO_E1;
-	else if (strnicmp(buf, "T1", 2) == 0)
+	else if (strncasecmp(buf, "T1", 2) == 0)
 		new_protocol = PRI_PROTO_T1;
-	else if (strnicmp(buf, "J1", 2) == 0)
+	else if (strncasecmp(buf, "J1", 2) == 0)
 		new_protocol = PRI_PROTO_J1;
 	else {
 		XPD_NOTICE(xpd,
diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h
index 54c415e..90d48a3 100644
--- a/include/dahdi/kernel.h
+++ b/include/dahdi/kernel.h
@@ -1502,6 +1502,8 @@ void dahdi_pci_disable_link_state(struct pci_dev *pdev, int state);
 #define list_first_entry(ptr, type, member) \
 	list_entry((ptr)->next, type, member)
 
+#define strncasecmp strnicmp
+
 #ifndef __packed
 #define __packed  __attribute__((packed))
 #endif 

commit 1cc0ad510acd404e63923ed3062b9302d53580da
Author: Shaun Ruffell <sruffell at digium.com>
Date:   Mon Mar 2 09:00:13 2015 -0600

    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 at digium.com>
    Acked-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>

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

-----------------------------------------------------------------------


-- 
dahdi/linux.git



More information about the dahdi-commits mailing list