diff options
author | Alexander Beregalov <a.beregalov@gmail.com> | 2009-04-11 10:50:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-13 18:44:36 -0400 |
commit | 0ee904c35cc3fdd26a9c76077d9692d458309186 (patch) | |
tree | ce1dee044974b7c6040bbdb794747cd1baa8f6bb /drivers/net/wireless | |
parent | 710b523ac59426e8bfdea3533f42118e46b9cbfb (diff) |
drivers/net: replace BUG() with BUG_ON() if possible
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath5k/reset.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/ath9k/ath9k.h | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2x00/ipw2200.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/if_usb.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/libertas_tf/if_usb.c | 3 |
5 files changed, 7 insertions, 17 deletions
diff --git a/drivers/net/wireless/ath5k/reset.c b/drivers/net/wireless/ath5k/reset.c index 7a17d31b2fd9..cb5e15f97095 100644 --- a/drivers/net/wireless/ath5k/reset.c +++ b/drivers/net/wireless/ath5k/reset.c | |||
@@ -54,9 +54,8 @@ static inline int ath5k_hw_write_ofdm_timings(struct ath5k_hw *ah, | |||
54 | u32 coef_scaled, coef_exp, coef_man, | 54 | u32 coef_scaled, coef_exp, coef_man, |
55 | ds_coef_exp, ds_coef_man, clock; | 55 | ds_coef_exp, ds_coef_man, clock; |
56 | 56 | ||
57 | if (!(ah->ah_version == AR5K_AR5212) || | 57 | BUG_ON(!(ah->ah_version == AR5K_AR5212) || |
58 | !(channel->hw_value & CHANNEL_OFDM)) | 58 | !(channel->hw_value & CHANNEL_OFDM)); |
59 | BUG(); | ||
60 | 59 | ||
61 | /* Get coefficient | 60 | /* Get coefficient |
62 | * ALGO: coef = (5 * clock * carrier_freq) / 2) | 61 | * ALGO: coef = (5 * clock * carrier_freq) / 2) |
diff --git a/drivers/net/wireless/ath9k/ath9k.h b/drivers/net/wireless/ath9k/ath9k.h index 2689a08a2844..7b1b40aaf09d 100644 --- a/drivers/net/wireless/ath9k/ath9k.h +++ b/drivers/net/wireless/ath9k/ath9k.h | |||
@@ -53,11 +53,7 @@ struct ath_node; | |||
53 | 53 | ||
54 | #define A_MAX(a, b) ((a) > (b) ? (a) : (b)) | 54 | #define A_MAX(a, b) ((a) > (b) ? (a) : (b)) |
55 | 55 | ||
56 | #define ASSERT(exp) do { \ | 56 | #define ASSERT(exp) BUG_ON(!(exp)) |
57 | if (unlikely(!(exp))) { \ | ||
58 | BUG(); \ | ||
59 | } \ | ||
60 | } while (0) | ||
61 | 57 | ||
62 | #define TSF_TO_TU(_h,_l) \ | 58 | #define TSF_TO_TU(_h,_l) \ |
63 | ((((u32)(_h)) << 22) | (((u32)(_l)) >> 10)) | 59 | ((((u32)(_h)) << 22) | (((u32)(_l)) >> 10)) |
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c index bd4dbcfe1bbe..9a123fbcc359 100644 --- a/drivers/net/wireless/ipw2x00/ipw2200.c +++ b/drivers/net/wireless/ipw2x00/ipw2200.c | |||
@@ -3176,11 +3176,8 @@ static int ipw_load_firmware(struct ipw_priv *priv, u8 * data, size_t len) | |||
3176 | /* Start the Dma */ | 3176 | /* Start the Dma */ |
3177 | rc = ipw_fw_dma_enable(priv); | 3177 | rc = ipw_fw_dma_enable(priv); |
3178 | 3178 | ||
3179 | if (priv->sram_desc.last_cb_index > 0) { | 3179 | /* the DMA is already ready this would be a bug. */ |
3180 | /* the DMA is already ready this would be a bug. */ | 3180 | BUG_ON(priv->sram_desc.last_cb_index > 0); |
3181 | BUG(); | ||
3182 | goto out; | ||
3183 | } | ||
3184 | 3181 | ||
3185 | do { | 3182 | do { |
3186 | chunk = (struct fw_chunk *)(data + offset); | 3183 | chunk = (struct fw_chunk *)(data + offset); |
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c index ea3dc038be76..d649caebf08a 100644 --- a/drivers/net/wireless/libertas/if_usb.c +++ b/drivers/net/wireless/libertas/if_usb.c | |||
@@ -686,8 +686,7 @@ static inline void process_cmdrequest(int recvlength, uint8_t *recvbuff, | |||
686 | return; | 686 | return; |
687 | } | 687 | } |
688 | 688 | ||
689 | if (!in_interrupt()) | 689 | BUG_ON(!in_interrupt()); |
690 | BUG(); | ||
691 | 690 | ||
692 | spin_lock(&priv->driver_lock); | 691 | spin_lock(&priv->driver_lock); |
693 | 692 | ||
diff --git a/drivers/net/wireless/libertas_tf/if_usb.c b/drivers/net/wireless/libertas_tf/if_usb.c index 59634c33b1f9..392337b37b1d 100644 --- a/drivers/net/wireless/libertas_tf/if_usb.c +++ b/drivers/net/wireless/libertas_tf/if_usb.c | |||
@@ -461,8 +461,7 @@ static inline void process_cmdrequest(int recvlength, uint8_t *recvbuff, | |||
461 | return; | 461 | return; |
462 | } | 462 | } |
463 | 463 | ||
464 | if (!in_interrupt()) | 464 | BUG_ON(!in_interrupt()); |
465 | BUG(); | ||
466 | 465 | ||
467 | spin_lock(&priv->driver_lock); | 466 | spin_lock(&priv->driver_lock); |
468 | memcpy(priv->cmd_resp_buff, recvbuff + MESSAGE_HEADER_LEN, | 467 | memcpy(priv->cmd_resp_buff, recvbuff + MESSAGE_HEADER_LEN, |