From 941d62b04346f8918baf1acce993d5ae3167c74c Mon Sep 17 00:00:00 2001 From: proski Date: Thu, 19 Jun 2008 16:58:07 +0000 Subject: [PATCH] KASSERT should add newline at the end to match FreeBSD behavior Fix KASSERT calls that add their own newline. git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3734 0192ed92-7a03-0410-a25b-9323aeb14dbd --- ath/if_ath.c | 4 ++-- ath_rate/minstrel/minstrel.c | 8 ++++---- ath_rate/sample/sample.c | 2 +- include/compat.h | 1 + net80211/ieee80211_crypto_ccmp.c | 4 ++-- net80211/ieee80211_crypto_tkip.c | 4 ++-- net80211/ieee80211_node.c | 2 +- net80211/ieee80211_proto.c | 14 +++++++------- 8 files changed, 20 insertions(+), 19 deletions(-) diff --git a/ath/if_ath.c b/ath/if_ath.c index 3eddaef..baae90c 100644 --- a/ath/if_ath.c +++ b/ath/if_ath.c @@ -8255,7 +8255,7 @@ ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq) (struct ieee80211_qosframe *)bf->bf_skb->data; an = ATH_NODE(ni); KASSERT(ni != NULL, ("Processing U-APSD txq for " - "ath_buf with no node!\n")); + "ath_buf with no node!")); if (qwh->i_qos[0] & IEEE80211_QOS_EOSP) { DPRINTF(sc, ATH_DEBUG_UAPSD, "EOSP detected for node (" MAC_FMT ") on desc %p\n", @@ -12537,7 +12537,7 @@ static inline struct ath_buf * descdma_get_buffer(struct ath_descdma *dd, int index) { KASSERT((index >= 0 && index < dd->dd_nbuf), - ("Invalid index, %d, requested for %s dma buffers.\n", index, dd->dd_name)); + ("Invalid index, %d, requested for %s dma buffers", index, dd->dd_name)); return dd->dd_bufptr + index; } diff --git a/ath_rate/minstrel/minstrel.c b/ath_rate/minstrel/minstrel.c index b0e8cfd..24f251e 100644 --- a/ath_rate/minstrel/minstrel.c +++ b/ath_rate/minstrel/minstrel.c @@ -386,7 +386,7 @@ ath_rate_findrate(struct ath_softc *sc, struct ath_node *an, *try0 = sn->retry_adjusted_count[ndx]; KASSERT((ndx < sn->num_rates), - ("%s: bad ndx (%d/%d) for " MAC_FMT "?\n", + ("%s: bad ndx (%d/%d) for " MAC_FMT "?", dev_info, ndx, sn->num_rates, MAC_ADDR(an->an_node.ni_macaddr))); @@ -420,17 +420,17 @@ ath_rate_get_mrr(struct ath_softc *sc, struct ath_node *an, int shortPreamble, rc3 = 0; KASSERT((rc1 >= 0) && (rc1 < sn->num_rates), - ("%s: bad rc1 (%d/%d) for " MAC_FMT "?\n", + ("%s: bad rc1 (%d/%d) for " MAC_FMT "?", dev_info, rc1, sn->num_rates, MAC_ADDR(an->an_node.ni_macaddr))); KASSERT((rc2 >= 0) && (rc2 < sn->num_rates), - ("%s: bad rc2 (%d/%d) for " MAC_FMT "?\n", + ("%s: bad rc2 (%d/%d) for " MAC_FMT "?", dev_info, rc2, sn->num_rates, MAC_ADDR(an->an_node.ni_macaddr))); KASSERT((rc3 >= 0) && (rc3 < sn->num_rates), - ("%s: bad rc3 (%d/%d) for " MAC_FMT "?\n", + ("%s: bad rc3 (%d/%d) for " MAC_FMT "?", dev_info, rc3, sn->num_rates, MAC_ADDR(an->an_node.ni_macaddr))); diff --git a/ath_rate/sample/sample.c b/ath_rate/sample/sample.c index a2903b9..8ff8958 100644 --- a/ath_rate/sample/sample.c +++ b/ath_rate/sample/sample.c @@ -490,7 +490,7 @@ ath_rate_findrate(struct ath_softc *sc, struct ath_node *an, } KASSERT(ndx >= 0 && ndx < sn->num_rates, - ("%s: bad ndx (%u/%u) for " MAC_FMT "?\n", + ("%s: bad ndx (%u/%u) for " MAC_FMT "?", dev_info, ndx, sn->num_rates, MAC_ADDR(an->an_node.ni_macaddr))); diff --git a/include/compat.h b/include/compat.h index 9e27dc7..324cb88 100644 --- a/include/compat.h +++ b/include/compat.h @@ -115,6 +115,7 @@ #define KASSERT(exp, msg) do { \ if (unlikely(!(exp))) { \ printk msg; \ + printk("\n"); \ BUG(); \ } \ } while (0) diff --git a/net80211/ieee80211_crypto_ccmp.c b/net80211/ieee80211_crypto_ccmp.c index 34dac0c..bf4d99b 100644 --- a/net80211/ieee80211_crypto_ccmp.c +++ b/net80211/ieee80211_crypto_ccmp.c @@ -541,7 +541,7 @@ ccmp_encrypt(struct ieee80211_key *key, struct sk_buff *skb0, int hdrlen) space_next = len > space ? len - space : 0; KASSERT(skb->len >= space_next, ("not enough data in following buffer, " - "skb len %u need %u\n", skb->len, space_next)); + "skb len %u need %u", skb->len, space_next)); xor_block(b + space, pos_next, space_next); CCMP_ENCRYPT(i, b, b0, pos, e, space); @@ -644,7 +644,7 @@ ccmp_decrypt(struct ieee80211_key *key, u_int64_t pn, struct sk_buff *skb0, int space_next = len > space ? len - space : 0; KASSERT(skb->len >= space_next, ("not enough data in following buffer, " - "skb len %u need %u\n", skb->len, space_next)); + "skb len %u need %u", skb->len, space_next)); xor_block(b+space, pos_next, space_next); CCMP_DECRYPT(i, b, b0, pos, a, space); diff --git a/net80211/ieee80211_crypto_tkip.c b/net80211/ieee80211_crypto_tkip.c index 509e9b3..ada981d 100644 --- a/net80211/ieee80211_crypto_tkip.c +++ b/net80211/ieee80211_crypto_tkip.c @@ -881,7 +881,7 @@ michael_mic(struct tkip_ctx *ctx, const u8 *key, break; skb = skb->next; if (skb == NULL) { - KASSERT(0, ("out of data, data_len %lu\n", + KASSERT(0, ("out of data, data_len %lu", (unsigned long)data_len)); break; } @@ -893,7 +893,7 @@ michael_mic(struct tkip_ctx *ctx, const u8 *key, data_next = skb->data; KASSERT(skb->len >= sizeof(uint32_t) - space, ("not enough data in following buffer, " - "skb len %u need %u\n", skb->len, + "skb len %u need %u", skb->len, (int)sizeof(uint32_t) - space)); switch (space) { case 1: diff --git a/net80211/ieee80211_node.c b/net80211/ieee80211_node.c index f622270..3f3afa8 100644 --- a/net80211/ieee80211_node.c +++ b/net80211/ieee80211_node.c @@ -2113,7 +2113,7 @@ ieee80211_node_join(struct ieee80211_node *ni, int resp) if (IEEE80211_IS_CHAN_ANYG(ic->ic_bsschan)) ieee80211_node_join_11g(ni); - KASSERT(ni->ni_suppchans == NULL, ("not a reassociation, but suppchans bitmap not NULL\n")); + KASSERT(ni->ni_suppchans == NULL, ("not a reassociation, but suppchans bitmap not NULL")); /* Use node's new suppchans as the current */ ni->ni_suppchans = ni->ni_suppchans_new; ni->ni_suppchans_new = NULL; diff --git a/net80211/ieee80211_proto.c b/net80211/ieee80211_proto.c index 89995e0..ccdf4b8 100644 --- a/net80211/ieee80211_proto.c +++ b/net80211/ieee80211_proto.c @@ -1573,7 +1573,7 @@ __ieee80211_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int case IEEE80211_S_SCAN: /* adhoc/hostap mode */ case IEEE80211_S_ASSOC: /* infra mode */ KASSERT(ni->ni_txrate < ni->ni_rates.rs_nrates, - ("%s: bogus xmit rate %u setup\n", __func__, + ("%s: bogus xmit rate %u setup", __func__, ni->ni_txrate)); #ifdef IEEE80211_DEBUG if (ieee80211_msg_debug(vap)) { @@ -1681,14 +1681,14 @@ static int get_dominant_state(struct ieee80211com *ic) { tmpvap->iv_state == IEEE80211_S_AUTH || tmpvap->iv_state == IEEE80211_S_ASSOC) { KASSERT((nscanning <= 1), ("Two VAPs cannot scan at " - "the same time\n")); + "the same time")); nscanning++; } } KASSERT(!(nscanning && nrunning), ("SCAN and RUN can't happen at the " - "same time\n")); + "same time")); KASSERT((nscanning <= 1), ("Two VAPs must not SCAN at the " - "same time\n")); + "same time")); if (nrunning > 0) return IEEE80211_S_RUN; @@ -1725,7 +1725,7 @@ dump_vap_states(struct ieee80211com *ic, struct ieee80211vap *highlighed) } if (tmpvap->iv_state == IEEE80211_S_RUN) { KASSERT((nscanning == 0), ("SCAN and RUN can't happen " - "at the same time\n")); + "at the same time")); nrunning++; } if (tmpvap->iv_state == IEEE80211_S_SCAN || @@ -1733,9 +1733,9 @@ dump_vap_states(struct ieee80211com *ic, struct ieee80211vap *highlighed) tmpvap->iv_state == IEEE80211_S_AUTH || tmpvap->iv_state == IEEE80211_S_ASSOC) { KASSERT((nscanning == 0), ("Two VAPs cannot scan at " - "the same time\n")); + "the same time")); KASSERT((nrunning == 0), ("SCAN and RUN can't happen " - "at the same time\n")); + "at the same time")); nscanning++; } } -- 2.35.1