Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266379
b: refs/heads/master
c: 7f90dce
h: refs/heads/master
i:
  266377: 7706593
  266375: 7b286d4
v: v3
  • Loading branch information
Emmanuel Grumbach authored and John W. Linville committed Sep 27, 2011
1 parent 7874571 commit 15790fe
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1a8496137d3707061758df1f7df1e7700a4863fd
refs/heads/master: 7f90dce1ea9de432cf1f196c743a8d5a119e38ba
12 changes: 7 additions & 5 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn-tt.c
Original file line number Diff line number Diff line change
Expand Up @@ -641,11 +641,13 @@ void iwl_tt_initialize(struct iwl_priv *priv)

if (priv->cfg->base_params->adv_thermal_throttle) {
IWL_DEBUG_TEMP(priv, "Advanced Thermal Throttling\n");
tt->restriction = kzalloc(sizeof(struct iwl_tt_restriction) *
IWL_TI_STATE_MAX, GFP_KERNEL);
tt->transaction = kzalloc(sizeof(struct iwl_tt_trans) *
IWL_TI_STATE_MAX * (IWL_TI_STATE_MAX - 1),
GFP_KERNEL);
tt->restriction = kcalloc(IWL_TI_STATE_MAX,
sizeof(struct iwl_tt_restriction),
GFP_KERNEL);
tt->transaction = kcalloc(IWL_TI_STATE_MAX *
(IWL_TI_STATE_MAX - 1),
sizeof(struct iwl_tt_trans),
GFP_KERNEL);
if (!tt->restriction || !tt->transaction) {
IWL_ERR(priv, "Fallback to Legacy Throttling\n");
priv->thermal_throttle.advanced_tt = false;
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/net/wireless/iwlwifi/iwl-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@ int iwl_init_geos(struct iwl_priv *priv)
return 0;
}

channels = kzalloc(sizeof(struct ieee80211_channel) *
priv->channel_count, GFP_KERNEL);
channels = kcalloc(priv->channel_count,
sizeof(struct ieee80211_channel), GFP_KERNEL);
if (!channels)
return -ENOMEM;

rates = kzalloc((sizeof(struct ieee80211_rate) * IWL_RATE_COUNT_LEGACY),
rates = kcalloc(IWL_RATE_COUNT_LEGACY, sizeof(struct ieee80211_rate),
GFP_KERNEL);
if (!rates) {
kfree(channels);
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/net/wireless/iwlwifi/iwl-eeprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -899,8 +899,9 @@ int iwl_init_channel_map(struct iwl_priv *priv)
IWL_DEBUG_EEPROM(priv, "Parsing data for %d channels.\n",
priv->channel_count);

priv->channel_info = kzalloc(sizeof(struct iwl_channel_info) *
priv->channel_count, GFP_KERNEL);
priv->channel_info = kcalloc(priv->channel_count,
sizeof(struct iwl_channel_info),
GFP_KERNEL);
if (!priv->channel_info) {
IWL_ERR(priv, "Could not allocate channel_info\n");
priv->channel_count = 0;
Expand Down
12 changes: 6 additions & 6 deletions trunk/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,8 @@ static int iwl_trans_txq_alloc(struct iwl_trans *trans,

txq->q.n_window = slots_num;

txq->meta = kzalloc(sizeof(txq->meta[0]) * slots_num, GFP_KERNEL);
txq->cmd = kzalloc(sizeof(txq->cmd[0]) * slots_num, GFP_KERNEL);
txq->meta = kcalloc(slots_num, sizeof(txq->meta[0]), GFP_KERNEL);
txq->cmd = kcalloc(slots_num, sizeof(txq->cmd[0]), GFP_KERNEL);

if (!txq->meta || !txq->cmd)
goto error;
Expand All @@ -322,8 +322,8 @@ static int iwl_trans_txq_alloc(struct iwl_trans *trans,
/* Driver private data, only for Tx (not command) queues,
* not shared with device. */
if (txq_id != trans->shrd->cmd_queue) {
txq->skbs = kzalloc(sizeof(txq->skbs[0]) *
TFD_QUEUE_SIZE_MAX, GFP_KERNEL);
txq->skbs = kcalloc(TFD_QUEUE_SIZE_MAX, sizeof(txq->skbs[0]),
GFP_KERNEL);
if (!txq->skbs) {
IWL_ERR(trans, "kmalloc for auxiliary BD "
"structures failed\n");
Expand Down Expand Up @@ -534,8 +534,8 @@ static int iwl_trans_tx_alloc(struct iwl_trans *trans)
goto error;
}

trans_pcie->txq = kzalloc(sizeof(struct iwl_tx_queue) *
hw_params(trans).max_txq_num, GFP_KERNEL);
trans_pcie->txq = kcalloc(hw_params(trans).max_txq_num,
sizeof(struct iwl_tx_queue), GFP_KERNEL);
if (!trans_pcie->txq) {
IWL_ERR(trans, "Not enough memory for txq\n");
ret = ENOMEM;
Expand Down

0 comments on commit 15790fe

Please sign in to comment.