Skip to content

Commit

Permalink
mwl8: fix build warning.
Browse files Browse the repository at this point in the history
This patch fixes a build warning in mwl8.c.
(Marvell TOPDOG wireless driver)

The warning it fixes is: "large integer implicitly truncated to unsigned type."

The rx_ctrl member of the mwl8k_rx_desc struct is 8 bit (__u8 ), whereas trying
to assign it a 32 bit value (which is returned from  cpu_to_le32())
causes the compiler to issue
a truncation warning.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Rami Rosen authored and John W. Linville committed Apr 21, 2009
1 parent d1bcb9f commit c491bf1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/wireless/mwl8k.c
Original file line number Diff line number Diff line change
Expand Up @@ -893,8 +893,7 @@ static int mwl8k_rxq_init(struct ieee80211_hw *hw, int index)
rx_desc->next_rx_desc_phys_addr =
cpu_to_le32(rxq->rx_desc_dma
+ nexti * sizeof(*rx_desc));
rx_desc->rx_ctrl =
cpu_to_le32(MWL8K_RX_CTRL_OWNED_BY_HOST);
rx_desc->rx_ctrl = MWL8K_RX_CTRL_OWNED_BY_HOST;
}

return 0;
Expand Down

0 comments on commit c491bf1

Please sign in to comment.