On Friday 14 September 2007 23:22:00 Larry Finger wrote:
> Michael Buesch wrote:
> > On Friday 14 September 2007 21:05:40 Larry Finger wrote:
> >> Are you using DMA or PIO? I did find some PIO endian problems,
> >
> > Where exactly?
>
> drivers/net/wireless/b43legacy/pio.c:612:29: warning: incorrect type in
> assignment (different base
> types)
> drivers/net/wireless/b43legacy/pio.c:612:29: expected unsigned short
> [unsigned] [short]
> [usertype] <noident>
> drivers/net/wireless/b43legacy/pio.c:612:29: got restricted unsigned short
> [usertype] <noident>
>
> These patches clear up the warnings.
>
> Index: wireless-dev/drivers/net/wireless/b43legacy/pio.c
> ===================================================================
> --- wireless-dev.orig/drivers/net/wireless/b43legacy/pio.c
> +++ wireless-dev/drivers/net/wireless/b43legacy/pio.c
> @@ -66,7 +66,7 @@ static u16 tx_get_next_word(const u8 *tx
> source = packet;
> i -= txhdr_size;
> }
> - ret = le16_to_cpu(*((u16 *)(source + i)));
> + ret = le16_to_cpu(*((__le16 *)(source + i)));
> *pos += 2;
>
> return ret;
> @@ -539,7 +539,7 @@ static void pio_rx_error(struct b43legac
>
> void b43legacy_pio_rx(struct b43legacy_pioqueue *queue)
> {
> - u16 preamble[21] = { 0 };
> + __le16 preamble[21] = { 0 };
> struct b43legacy_rxhdr_fw3 *rxhdr;
> u16 tmp;
> u16 len;
> @@ -609,7 +609,7 @@ data_ready:
> skb_put(skb, len);
> for (i = 0; i < len - 1; i += 2) {
> tmp = b43legacy_pio_read(queue, B43legacy_PIO_RXDATA);
> - *((u16 *)(skb->data + i)) = cpu_to_le16(tmp);
> + *((__le16 *)(skb->data + i)) = cpu_to_le16(tmp);
> }
> if (len % 2) {
> tmp = b43legacy_pio_read(queue, B43legacy_PIO_RXDATA);
>
>
That are no endianess issues. These are false sparse positives, because
the wrong types were used. The generated code is the same.
--
Greetings Michael.
_______________________________________________
Bcm43xx-dev mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev