diff for duplicates of <51CBA442.2090400@gmail.com> diff --git a/a/1.txt b/N1/1.txt index 3cc1a25..156b18b 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -102,7 +102,7 @@ direct usage of pr_debug per file. Would have been much easier to reivew. > -do { \ > - const union sctp_addr *_addr = (addr); \ > - if (sctp_debug_flag) { \ -> - if (_addr->sa.sa_family = AF_INET6) { \ +> - if (_addr->sa.sa_family == AF_INET6) { \ > - printk(KERN_DEBUG \ > - pr_fmt(fmt_lead "%pI6" fmt_trail), \ > - args_lead, \ @@ -149,7 +149,8 @@ direct usage of pr_debug per file. Would have been much easier to reivew. > -/* Perform some sanity checks. */ > -static inline int sctp_sanity_check(void) > -{ -> - SCTP_ASSERT(sizeof(struct sctp_ulpevent) <> - sizeof(((struct sk_buff *)0)->cb), +> - SCTP_ASSERT(sizeof(struct sctp_ulpevent) <= +> - sizeof(((struct sk_buff *)0)->cb), > - "SCTP: ulpevent does not fit in skb!\n", return 0); > - > - return 1; @@ -250,7 +251,7 @@ hoping that we can get rid of this wart in the future. > + asoc, &addr->sa, port, peer_state); > > /* Set the port if it has not been set yet. */ -> if (0 = asoc->peer.port) +> if (0 == asoc->peer.port) > @@ -708,8 +706,9 @@ struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *asoc, > else > asoc->pathmtu = peer->pathmtu; @@ -764,7 +765,7 @@ converting it to pr_debug should be sufficient. > +#ifdef CONFIG_SCTP_DBG_TSNS > switch (dbg_prt_state) { > case 0: /* last TSN was ACKed */ -> if (dbg_last_ack_tsn + 1 = tsn) { +> if (dbg_last_ack_tsn + 1 == tsn) { > @@ -1497,42 +1486,39 @@ static void sctp_check_transmitted(struct sctp_outq *q, > /* Display the end of the > * current range. @@ -899,7 +900,7 @@ converting it to pr_debug should be sufficient. > struct sctp_association *asoc = transport->asoc; > @@ -1676,9 +1659,9 @@ static void sctp_check_transmitted(struct sctp_outq *q, > !list_empty(&tlist) && -> (sack_ctsn+2 = q->asoc->next_tsn) && +> (sack_ctsn+2 == q->asoc->next_tsn) && > q->asoc->state < SCTP_STATE_SHUTDOWN_PENDING) { > - SCTP_DEBUG_PRINTK("%s: SACK received for zero " > - "window probe: %u\n", @@ -982,7 +983,7 @@ converting it to pr_debug should be sufficient. > #if IS_ENABLED(CONFIG_IPV6) > /* Now we send an ASCONF for each association */ > @@ -623,8 +623,10 @@ static void sctp_addr_wq_timeout_handler(unsigned long arg) -> addrw->state = SCTP_ADDR_NEW) { +> addrw->state == SCTP_ADDR_NEW) { > unsigned long timeo_val; > > - SCTP_DEBUG_PRINTK("sctp_timo_handler: this is on DAD, trying %d sec later\n", @@ -1544,7 +1545,7 @@ converting it to pr_debug should be sufficient. > @@ -6179,12 +6195,12 @@ static int sctp_eat_data(const struct sctp_association *asoc, > */ > if (sctp_tsnmap_has_gap(map) && -> (sctp_tsnmap_get_ctsn(map) + 1) = tsn) { +> (sctp_tsnmap_get_ctsn(map) + 1) == tsn) { > - SCTP_DEBUG_PRINTK("Reneging for tsn:%u\n", tsn); > + pr_debug("%s: reneging for tsn:%u\n", __func__, tsn); > deliver = SCTP_CMD_RENEGE; @@ -1561,7 +1562,7 @@ converting it to pr_debug should be sufficient. > @@ -6199,7 +6215,8 @@ static int sctp_eat_data(const struct sctp_association *asoc, > if (*sk->sk_prot_creator->memory_pressure) { > if (sctp_tsnmap_has_gap(map) && -> (sctp_tsnmap_get_ctsn(map) + 1) = tsn) { +> (sctp_tsnmap_get_ctsn(map) + 1) == tsn) { > - SCTP_DEBUG_PRINTK("Under Pressure! Reneging for tsn:%u\n", tsn); > + pr_debug("%s: under pressure, reneging for tsn:%u\n", > + __func__, tsn); @@ -1994,7 +1995,7 @@ better code. > + > sctp_local_bh_disable(); > -> if (snum = 0) { +> if (snum == 0) { > @@ -5960,7 +5951,8 @@ pp_found: > int reuse = sk->sk_reuse; > struct sock *sk2; @@ -2069,7 +2070,7 @@ better code. > { > - /* Check for valid transport. */ > - SCTP_ASSERT(tp, "NULL transport", return); -> + BUG_ON(tp = NULL); +> + BUG_ON(tp == NULL); > > - /* We should not be doing any RTO updates unless rto_pending is set. */ > - SCTP_ASSERT(tp->rto_pending, "rto_pending not set", return); diff --git a/a/content_digest b/N1/content_digest index 2c26d4f..2b63129 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -2,7 +2,7 @@ "ref\01372266073-11998-3-git-send-email-dborkman@redhat.com\0" "From\0Vlad Yasevich <vyasevich@gmail.com>\0" "Subject\0Re: [PATCH net-next 2/2] net: sctp: rework debugging framework to use pr_debug and friends\0" - "Date\0Thu, 27 Jun 2013 02:32:34 +0000\0" + "Date\0Wed, 26 Jun 2013 22:32:34 -0400\0" "To\0Daniel Borkmann <dborkman@redhat.com>\0" "Cc\0davem@davemloft.net" netdev@vger.kernel.org @@ -113,7 +113,7 @@ "> -do {\t\t\t\t\t\t\t\t\t\\\n" "> -\tconst union sctp_addr *_addr = (addr);\t\t\t\t\\\n" "> -\tif (sctp_debug_flag) {\t\t\t\t\t\t\\\n" - "> -\t\tif (_addr->sa.sa_family = AF_INET6) {\t\t\t\\\n" + "> -\t\tif (_addr->sa.sa_family == AF_INET6) {\t\t\t\\\n" "> -\t\t\tprintk(KERN_DEBUG\t\t\t\t\\\n" "> -\t\t\t pr_fmt(fmt_lead \"%pI6\" fmt_trail),\t\\\n" "> -\t\t\t args_lead,\t\t\t\t\\\n" @@ -160,7 +160,8 @@ "> -/* Perform some sanity checks. */\n" "> -static inline int sctp_sanity_check(void)\n" "> -{\n" - "> -\tSCTP_ASSERT(sizeof(struct sctp_ulpevent) <> -\t\t sizeof(((struct sk_buff *)0)->cb),\n" + "> -\tSCTP_ASSERT(sizeof(struct sctp_ulpevent) <=\n" + "> -\t\t sizeof(((struct sk_buff *)0)->cb),\n" "> -\t\t \"SCTP: ulpevent does not fit in skb!\\n\", return 0);\n" "> -\n" "> -\treturn 1;\n" @@ -261,7 +262,7 @@ "> +\t\t asoc, &addr->sa, port, peer_state);\n" ">\n" "> \t/* Set the port if it has not been set yet. */\n" - "> \tif (0 = asoc->peer.port)\n" + "> \tif (0 == asoc->peer.port)\n" "> @@ -708,8 +706,9 @@ struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *asoc,\n" "> \telse\n" "> \t\tasoc->pathmtu = peer->pathmtu;\n" @@ -775,7 +776,7 @@ "> +#ifdef CONFIG_SCTP_DBG_TSNS\n" "> \t\t\tswitch (dbg_prt_state) {\n" "> \t\t\tcase 0:\t/* last TSN was ACKed */\n" - "> \t\t\t\tif (dbg_last_ack_tsn + 1 = tsn) {\n" + "> \t\t\t\tif (dbg_last_ack_tsn + 1 == tsn) {\n" "> @@ -1497,42 +1486,39 @@ static void sctp_check_transmitted(struct sctp_outq *q,\n" "> \t\t\t\t\t/* Display the end of the\n" "> \t\t\t\t\t * current range.\n" @@ -910,7 +911,7 @@ "> \t\t\tstruct sctp_association *asoc = transport->asoc;\n" "> @@ -1676,9 +1659,9 @@ static void sctp_check_transmitted(struct sctp_outq *q,\n" "> \t\t\t !list_empty(&tlist) &&\n" - "> \t\t\t (sack_ctsn+2 = q->asoc->next_tsn) &&\n" + "> \t\t\t (sack_ctsn+2 == q->asoc->next_tsn) &&\n" "> \t\t\t q->asoc->state < SCTP_STATE_SHUTDOWN_PENDING) {\n" "> -\t\t\t\tSCTP_DEBUG_PRINTK(\"%s: SACK received for zero \"\n" "> -\t\t\t\t\t\t \"window probe: %u\\n\",\n" @@ -993,7 +994,7 @@ "> #if IS_ENABLED(CONFIG_IPV6)\n" "> \t\t/* Now we send an ASCONF for each association */\n" "> @@ -623,8 +623,10 @@ static void sctp_addr_wq_timeout_handler(unsigned long arg)\n" - "> \t\t\t addrw->state = SCTP_ADDR_NEW) {\n" + "> \t\t\t addrw->state == SCTP_ADDR_NEW) {\n" "> \t\t\t\tunsigned long timeo_val;\n" ">\n" "> -\t\t\t\tSCTP_DEBUG_PRINTK(\"sctp_timo_handler: this is on DAD, trying %d sec later\\n\",\n" @@ -1555,7 +1556,7 @@ "> @@ -6179,12 +6195,12 @@ static int sctp_eat_data(const struct sctp_association *asoc,\n" "> \t\t */\n" "> \t\tif (sctp_tsnmap_has_gap(map) &&\n" - "> \t\t (sctp_tsnmap_get_ctsn(map) + 1) = tsn) {\n" + "> \t\t (sctp_tsnmap_get_ctsn(map) + 1) == tsn) {\n" "> -\t\t\tSCTP_DEBUG_PRINTK(\"Reneging for tsn:%u\\n\", tsn);\n" "> +\t\t\tpr_debug(\"%s: reneging for tsn:%u\\n\", __func__, tsn);\n" "> \t\t\tdeliver = SCTP_CMD_RENEGE;\n" @@ -1572,7 +1573,7 @@ "> @@ -6199,7 +6215,8 @@ static int sctp_eat_data(const struct sctp_association *asoc,\n" "> \tif (*sk->sk_prot_creator->memory_pressure) {\n" "> \t\tif (sctp_tsnmap_has_gap(map) &&\n" - "> \t (sctp_tsnmap_get_ctsn(map) + 1) = tsn) {\n" + "> \t (sctp_tsnmap_get_ctsn(map) + 1) == tsn) {\n" "> -\t\t\tSCTP_DEBUG_PRINTK(\"Under Pressure! Reneging for tsn:%u\\n\", tsn);\n" "> +\t\t\tpr_debug(\"%s: under pressure, reneging for tsn:%u\\n\",\n" "> +\t\t\t\t __func__, tsn);\n" @@ -2005,7 +2006,7 @@ "> +\n" "> \tsctp_local_bh_disable();\n" ">\n" - "> \tif (snum = 0) {\n" + "> \tif (snum == 0) {\n" "> @@ -5960,7 +5951,8 @@ pp_found:\n" "> \t\tint reuse = sk->sk_reuse;\n" "> \t\tstruct sock *sk2;\n" @@ -2080,7 +2081,7 @@ "> {\n" "> -\t/* Check for valid transport. */\n" "> -\tSCTP_ASSERT(tp, \"NULL transport\", return);\n" - "> +\tBUG_ON(tp = NULL);\n" + "> +\tBUG_ON(tp == NULL);\n" ">\n" "> -\t/* We should not be doing any RTO updates unless rto_pending is set. */\n" "> -\tSCTP_ASSERT(tp->rto_pending, \"rto_pending not set\", return);\n" @@ -2158,4 +2159,4 @@ "> /* Apply Max.Burst limit to the congestion window:\n" > -20895454b666f6c419dde4c92fc0a2fa360c02972617048eb4f2b06c68b49eef +656e9563cd56f874c37003a551eb35cec57b737a4c8f4bf99474fed25099d1e4
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.