diff options
author | Joe Perches <joe@perches.com> | 2010-08-24 09:21:08 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-08-26 17:11:48 -0400 |
commit | 145ce502e44b57c074c72cfdc855557e19026999 (patch) | |
tree | fd663feae03f5c5f4a31ceecd6a61e790344b8b3 /net/sctp/outqueue.c | |
parent | dee06e4702b5a64b9ca81e650d66223c5b3e7f14 (diff) |
net/sctp: Use pr_fmt and pr_<level>
Change SCTP_DEBUG_PRINTK and SCTP_DEBUG_PRINTK_IPADDR to
use do { print } while (0) guards.
Add SCTP_DEBUG_PRINTK_CONT to fix errors in log when
lines were continued.
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Add a missing newline in "Failed bind hash alloc"
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/outqueue.c')
-rw-r--r-- | net/sctp/outqueue.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index c04b2eb59186..8c6d379b4bb6 100644 --- a/net/sctp/outqueue.c +++ b/net/sctp/outqueue.c | |||
@@ -46,6 +46,8 @@ | |||
46 | * be incorporated into the next SCTP release. | 46 | * be incorporated into the next SCTP release. |
47 | */ | 47 | */ |
48 | 48 | ||
49 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
50 | |||
49 | #include <linux/types.h> | 51 | #include <linux/types.h> |
50 | #include <linux/list.h> /* For struct list_head */ | 52 | #include <linux/list.h> /* For struct list_head */ |
51 | #include <linux/socket.h> | 53 | #include <linux/socket.h> |
@@ -1463,23 +1465,23 @@ static void sctp_check_transmitted(struct sctp_outq *q, | |||
1463 | /* Display the end of the | 1465 | /* Display the end of the |
1464 | * current range. | 1466 | * current range. |
1465 | */ | 1467 | */ |
1466 | SCTP_DEBUG_PRINTK("-%08x", | 1468 | SCTP_DEBUG_PRINTK_CONT("-%08x", |
1467 | dbg_last_ack_tsn); | 1469 | dbg_last_ack_tsn); |
1468 | } | 1470 | } |
1469 | 1471 | ||
1470 | /* Start a new range. */ | 1472 | /* Start a new range. */ |
1471 | SCTP_DEBUG_PRINTK(",%08x", tsn); | 1473 | SCTP_DEBUG_PRINTK_CONT(",%08x", tsn); |
1472 | dbg_ack_tsn = tsn; | 1474 | dbg_ack_tsn = tsn; |
1473 | break; | 1475 | break; |
1474 | 1476 | ||
1475 | case 1: /* The last TSN was NOT ACKed. */ | 1477 | case 1: /* The last TSN was NOT ACKed. */ |
1476 | if (dbg_last_kept_tsn != dbg_kept_tsn) { | 1478 | if (dbg_last_kept_tsn != dbg_kept_tsn) { |
1477 | /* Display the end of current range. */ | 1479 | /* Display the end of current range. */ |
1478 | SCTP_DEBUG_PRINTK("-%08x", | 1480 | SCTP_DEBUG_PRINTK_CONT("-%08x", |
1479 | dbg_last_kept_tsn); | 1481 | dbg_last_kept_tsn); |
1480 | } | 1482 | } |
1481 | 1483 | ||
1482 | SCTP_DEBUG_PRINTK("\n"); | 1484 | SCTP_DEBUG_PRINTK_CONT("\n"); |
1483 | 1485 | ||
1484 | /* FALL THROUGH... */ | 1486 | /* FALL THROUGH... */ |
1485 | default: | 1487 | default: |
@@ -1526,18 +1528,18 @@ static void sctp_check_transmitted(struct sctp_outq *q, | |||
1526 | break; | 1528 | break; |
1527 | 1529 | ||
1528 | if (dbg_last_kept_tsn != dbg_kept_tsn) | 1530 | if (dbg_last_kept_tsn != dbg_kept_tsn) |
1529 | SCTP_DEBUG_PRINTK("-%08x", | 1531 | SCTP_DEBUG_PRINTK_CONT("-%08x", |
1530 | dbg_last_kept_tsn); | 1532 | dbg_last_kept_tsn); |
1531 | 1533 | ||
1532 | SCTP_DEBUG_PRINTK(",%08x", tsn); | 1534 | SCTP_DEBUG_PRINTK_CONT(",%08x", tsn); |
1533 | dbg_kept_tsn = tsn; | 1535 | dbg_kept_tsn = tsn; |
1534 | break; | 1536 | break; |
1535 | 1537 | ||
1536 | case 0: | 1538 | case 0: |
1537 | if (dbg_last_ack_tsn != dbg_ack_tsn) | 1539 | if (dbg_last_ack_tsn != dbg_ack_tsn) |
1538 | SCTP_DEBUG_PRINTK("-%08x", | 1540 | SCTP_DEBUG_PRINTK_CONT("-%08x", |
1539 | dbg_last_ack_tsn); | 1541 | dbg_last_ack_tsn); |
1540 | SCTP_DEBUG_PRINTK("\n"); | 1542 | SCTP_DEBUG_PRINTK_CONT("\n"); |
1541 | 1543 | ||
1542 | /* FALL THROUGH... */ | 1544 | /* FALL THROUGH... */ |
1543 | default: | 1545 | default: |
@@ -1556,17 +1558,17 @@ static void sctp_check_transmitted(struct sctp_outq *q, | |||
1556 | switch (dbg_prt_state) { | 1558 | switch (dbg_prt_state) { |
1557 | case 0: | 1559 | case 0: |
1558 | if (dbg_last_ack_tsn != dbg_ack_tsn) { | 1560 | if (dbg_last_ack_tsn != dbg_ack_tsn) { |
1559 | SCTP_DEBUG_PRINTK("-%08x\n", dbg_last_ack_tsn); | 1561 | SCTP_DEBUG_PRINTK_CONT("-%08x\n", dbg_last_ack_tsn); |
1560 | } else { | 1562 | } else { |
1561 | SCTP_DEBUG_PRINTK("\n"); | 1563 | SCTP_DEBUG_PRINTK_CONT("\n"); |
1562 | } | 1564 | } |
1563 | break; | 1565 | break; |
1564 | 1566 | ||
1565 | case 1: | 1567 | case 1: |
1566 | if (dbg_last_kept_tsn != dbg_kept_tsn) { | 1568 | if (dbg_last_kept_tsn != dbg_kept_tsn) { |
1567 | SCTP_DEBUG_PRINTK("-%08x\n", dbg_last_kept_tsn); | 1569 | SCTP_DEBUG_PRINTK_CONT("-%08x\n", dbg_last_kept_tsn); |
1568 | } else { | 1570 | } else { |
1569 | SCTP_DEBUG_PRINTK("\n"); | 1571 | SCTP_DEBUG_PRINTK_CONT("\n"); |
1570 | } | 1572 | } |
1571 | } | 1573 | } |
1572 | #endif /* SCTP_DEBUG */ | 1574 | #endif /* SCTP_DEBUG */ |