* [PATCH ] mwl8: fix build warning.
@ 2009-04-21 11:57 Rami Rosen
2009-04-21 12:32 ` Johannes Berg
0 siblings, 1 reply; 3+ messages in thread
From: Rami Rosen @ 2009-04-21 11:57 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, David Miller, buytenh
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."
Signed-off-by: Rami Rosen <ramirose@gmail.com>
--
(wireless-next)
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 57a0268..8bc016c 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -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;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH ] mwl8: fix build warning.
2009-04-21 11:57 [PATCH ] mwl8: fix build warning Rami Rosen
@ 2009-04-21 12:32 ` Johannes Berg
2009-04-21 13:54 ` John W. Linville
0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2009-04-21 12:32 UTC (permalink / raw)
To: Rami Rosen; +Cc: linville, linux-wireless, David Miller, buytenh
[-- Attachment #1: Type: text/plain, Size: 421 bytes --]
On Tue, 2009-04-21 at 14:57 +0300, Rami Rosen wrote:
> 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."
> - rx_desc->rx_ctrl =
> - cpu_to_le32(MWL8K_RX_CTRL_OWNED_BY_HOST);
> + rx_desc->rx_ctrl = MWL8K_RX_CTRL_OWNED_BY_HOST;
Umm. This really needs to come with an explanation.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH ] mwl8: fix build warning.
2009-04-21 12:32 ` Johannes Berg
@ 2009-04-21 13:54 ` John W. Linville
0 siblings, 0 replies; 3+ messages in thread
From: John W. Linville @ 2009-04-21 13:54 UTC (permalink / raw)
To: Johannes Berg; +Cc: Rami Rosen, linux-wireless, David Miller, buytenh
On Tue, Apr 21, 2009 at 02:32:00PM +0200, Johannes Berg wrote:
> On Tue, 2009-04-21 at 14:57 +0300, Rami Rosen wrote:
> > 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."
>
> > - rx_desc->rx_ctrl =
> > - cpu_to_le32(MWL8K_RX_CTRL_OWNED_BY_HOST);
> > + rx_desc->rx_ctrl = MWL8K_RX_CTRL_OWNED_BY_HOST;
>
> Umm. This really needs to come with an explanation.
Yeah -- trading a warning for a silent error seems unreasonable. :-)
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-04-21 14:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-21 11:57 [PATCH ] mwl8: fix build warning Rami Rosen
2009-04-21 12:32 ` Johannes Berg
2009-04-21 13:54 ` John W. Linville
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).