diff --git a/debugfs.c b/debugfs.c index fb28cb04..181627cd 100644 --- a/debugfs.c +++ b/debugfs.c @@ -363,11 +363,16 @@ static ssize_t mwl_debugfs_info_read(struct file *file, char __user *ubuf, len += scnprintf(p + len, size - len, "-----------------------=> address| address|qlen|fw_desc_cnt\n"); spin_lock_irqsave(&pcie_priv->tx_desc_lock, flags); - len += scnprintf(p + len, size - len, - "wcb_base0 : %x => %8x|%8p|%4d|%d\n", get_hw_spec->wcb_base0, *((unsigned int *)le32_to_cpu(get_hw_spec->wcb_base0)),(void *)*((unsigned int *)le32_to_cpu(get_hw_spec->wcb_base0)),skb_queue_len(&pcie_priv->txq[0]),pcie_priv->fw_desc_cnt[0]); + len += scnprintf(p + len, size - len, "wcb_base0 : %x => %8x|%8p|%4u|%d\n", + get_hw_spec->wcb_base0, le32_to_cpu(get_hw_spec->wcb_base0), + &get_hw_spec->wcb_base0, skb_queue_len(&pcie_priv->txq[0]), + pcie_priv->fw_desc_cnt[0]); for(i = 0; i < SYSADPT_TOTAL_TX_QUEUES - 1; i++) - len += scnprintf(p + len, size - len, - "wcb_base[%2d]: %x => %8x|%8p|%4d|%d\n", i, get_hw_spec->wcb_base[i], *((unsigned int *)le32_to_cpu(get_hw_spec->wcb_base[i])),(void *)*((unsigned int *)le32_to_cpu(get_hw_spec->wcb_base[i])),skb_queue_len(&pcie_priv->txq[i + 1]),pcie_priv->fw_desc_cnt[i + 1]); + len += scnprintf( + p + len, size - len, "wcb_base[%2d]: %x => %8x|%8p|%4u|%d\n", i, + get_hw_spec->wcb_base[i], le32_to_cpu(get_hw_spec->wcb_base[i]), + &get_hw_spec->wcb_base[i], skb_queue_len(&pcie_priv->txq[i + 1]), + pcie_priv->fw_desc_cnt[i + 1]); spin_unlock_irqrestore(&pcie_priv->tx_desc_lock, flags); } @@ -1341,10 +1346,8 @@ static ssize_t mwl_debugfs_regrdwr_read(struct file *file, char __user *ubuf, priv->reg_type, priv->reg_offset, priv->reg_value); else - len += scnprintf(p + len, size - len, - "error: %d(%u 0x%08x 0x%08x)\n", - ret, priv->reg_type, priv->reg_offset, - priv->reg_value); + len += scnprintf(p + len, size - len, "error: %zd(%u 0x%08x 0x%08x)\n", ret, + priv->reg_type, priv->reg_offset, priv->reg_value); ret = simple_read_from_buffer(ubuf, count, ppos, p, len); diff --git a/hif/fwcmd.c b/hif/fwcmd.c index fbd5df80..f344ce23 100644 --- a/hif/fwcmd.c +++ b/hif/fwcmd.c @@ -2624,7 +2624,7 @@ int mwl_fwcmd_encryption_set_key(struct ieee80211_hw *hw, return -ENOTSUPP; } - memcpy((void *)&pcmd->key_param.key, key->key, keymlen); + memcpy(&pcmd->key_param.key, key->key, keymlen); pcmd->action_type = cpu_to_le32(action); if (mwl_hif_exec_cmd(hw, HOSTCMD_CMD_UPDATE_ENCRYPTION)) { @@ -3622,11 +3622,7 @@ int mwl_fwcmd_get_fw_core_dump(struct ieee80211_hw *hw, core_dump->context = pcmd->cmd_data.coredump.context; core_dump->size_kb = pcmd->cmd_data.coredump.size_kb; core_dump->flags = pcmd->cmd_data.coredump.flags; - memcpy(buff, - (const void *)((u32)pcmd + - sizeof(struct hostcmd_cmd_get_fw_core_dump) - - sizeof(struct hostcmd_cmd_get_fw_core_dump_)), - MAX_CORE_DUMP_BUFFER); + memcpy(buff, pcmd->buffer, MAX_CORE_DUMP_BUFFER); mutex_unlock(&priv->fwcmd_mutex); diff --git a/hif/pcie/8964/tx_ndp.c b/hif/pcie/8964/tx_ndp.c index 899d2493..8089c7e8 100644 --- a/hif/pcie/8964/tx_ndp.c +++ b/hif/pcie/8964/tx_ndp.c @@ -336,9 +336,8 @@ int pcie_tx_init_ndp(struct ieee80211_hw *hw) if (sizeof(struct pcie_tx_ctrl_ndp) > sizeof(tx_info->driver_data)) { - wiphy_err(hw->wiphy, "driver data is not enough: %d (%d)\n", - sizeof(struct pcie_tx_ctrl_ndp), - sizeof(tx_info->driver_data)); + wiphy_err(hw->wiphy, "driver data is not enough: %zu (%zu)\n", + sizeof(struct pcie_tx_ctrl_ndp), sizeof(tx_info->driver_data)); return -ENOMEM; } diff --git a/hif/pcie/pcie.c b/hif/pcie/pcie.c index e55811f4..1ca3e88b 100644 --- a/hif/pcie/pcie.c +++ b/hif/pcie/pcie.c @@ -1466,8 +1466,7 @@ static void pcie_bf_mimo_ctrl_decode(struct mwl_priv *priv, &fp_data->f_pos); filp_close(fp_data, current->files); } else { - wiphy_err(priv->hw->wiphy, "Error opening %s! %x\n", - filename, (unsigned int)fp_data); + wiphy_err(priv->hw->wiphy, "Error opening %s! %ld\n", filename, PTR_ERR(fp_data)); } #if LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0)