Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation warning with 64 bit system #413

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,10 +364,10 @@ static ssize_t mwl_debugfs_info_read(struct file *file, char __user *ubuf,
"-----------------------=> 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]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zx requires size_t.

"wcb_base0 : %x => %8zx|%8p|%4d|%d\n", get_hw_spec->wcb_base0, *((uintptr_t *)(uintptr_t)le32_to_cpu(get_hw_spec->wcb_base0)),(void *)*((uintptr_t *)(uintptr_t)le32_to_cpu(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]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can delete this part :

*((unsigned int *)le32_to_cpu(get_hw_spec->wcb_base[i])),(void *)*((unsigned int *)le32_to_cpu(get_hw_spec->wcb_base[i])),

wcb_base must be an internal memory on the 88X8xxx chip, searching RAM is useless.

"wcb_base[%2d]: %x => %8zx|%8p|%4d|%d\n", i, get_hw_spec->wcb_base[i], *((uintptr_t *)(uintptr_t)le32_to_cpu(get_hw_spec->wcb_base[i])),(void *)*((uintptr_t *)(uintptr_t)le32_to_cpu(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);
}

Expand Down