Skip to content

Commit

Permalink
iwlwifi: remove redundant argument from iwl_dump_nic_event_log
Browse files Browse the repository at this point in the history
We can check buf against NULL instead of having additional bool
variable.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Stanislaw Gruszka authored and Johannes Berg committed Apr 18, 2013
1 parent 3309ccf commit a6db006
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion drivers/net/wireless/iwlwifi/dvm/agn.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ int iwl_calib_set(struct iwl_priv *priv,
const struct iwl_calib_hdr *cmd, int len);
void iwl_calib_free_results(struct iwl_priv *priv);
int iwl_dump_nic_event_log(struct iwl_priv *priv, bool full_log,
char **buf, bool display);
char **buf);
int iwlagn_hw_valid_rtc_data_addr(u32 addr);

/* lib */
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/wireless/iwlwifi/dvm/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -2240,7 +2240,7 @@ static ssize_t iwl_dbgfs_log_event_read(struct file *file,
char *buf = NULL;
ssize_t ret;

ret = iwl_dump_nic_event_log(priv, true, &buf, true);
ret = iwl_dump_nic_event_log(priv, true, &buf);
if (ret < 0)
goto err;
ret = simple_read_from_buffer(user_buf, count, ppos, buf, ret);
Expand Down Expand Up @@ -2269,7 +2269,7 @@ static ssize_t iwl_dbgfs_log_event_write(struct file *file,
if (sscanf(buf, "%d", &event_log_flag) != 1)
return -EFAULT;
if (event_log_flag == 1)
iwl_dump_nic_event_log(priv, true, NULL, false);
iwl_dump_nic_event_log(priv, true, NULL);

return count;
}
Expand Down
6 changes: 3 additions & 3 deletions drivers/net/wireless/iwlwifi/dvm/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1795,7 +1795,7 @@ static int iwl_print_last_event_logs(struct iwl_priv *priv, u32 capacity,
#define DEFAULT_DUMP_EVENT_LOG_ENTRIES (20)

int iwl_dump_nic_event_log(struct iwl_priv *priv, bool full_log,
char **buf, bool display)
char **buf)
{
u32 base; /* SRAM byte address of event log header */
u32 capacity; /* event log capacity in # entries */
Expand Down Expand Up @@ -1866,7 +1866,7 @@ int iwl_dump_nic_event_log(struct iwl_priv *priv, bool full_log,
size);

#ifdef CONFIG_IWLWIFI_DEBUG
if (display) {
if (buf) {
if (full_log)
bufsz = capacity * 48;
else
Expand Down Expand Up @@ -1962,7 +1962,7 @@ static void iwl_nic_error(struct iwl_op_mode *op_mode)
priv->fw->fw_version);

iwl_dump_nic_error_log(priv);
iwl_dump_nic_event_log(priv, false, NULL, false);
iwl_dump_nic_event_log(priv, false, NULL);

iwlagn_fw_error(priv, false);
}
Expand Down

0 comments on commit a6db006

Please sign in to comment.