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
9 changes: 2 additions & 7 deletions hif/pcie/8964/tx_ndp.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,13 +334,8 @@ int pcie_tx_init_ndp(struct ieee80211_hw *hw)
struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(&skb);
int rc;

if (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;
}
BUILD_BUG_ON(sizeof(struct pcie_tx_ctrl_ndp) >
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it make sense to use BUILD_BUG_ON_MSG instead?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, thank you for maintaining this message, it's an initialization function, it doesn't cost anything in terms of performance.

sizeof(tx_info->driver_data));

rc = pcie_tx_ring_alloc_ndp(priv);
if (rc) {
Expand Down