On Saturday 15 September 2007 14:36:14 David Woodhouse wrote:
> On Fri, 2007-09-14 at 16:19 -0500, Larry Finger wrote:
> > --- wireless-dev.orig/drivers/net/wireless/b43legacy/xmit.c
> > +++ wireless-dev/drivers/net/wireless/b43legacy/xmit.c
> > @@ -125,10 +125,12 @@ void b43legacy_generate_plcp_hdr(struct 
> >         __u8 *raw = plcp->raw;
> >  
> >         if (b43legacy_is_ofdm_rate(bitrate)) {
> > -               *data = b43legacy_plcp_get_ratecode_ofdm(bitrate);
> > +               u16 d;
> > +
> > +               d = b43legacy_plcp_get_ratecode_ofdm(bitrate);
> >                 B43legacy_WARN_ON(octets & 0xF000);
> > -               *data |= (octets << 5);
> > -               *data = cpu_to_le32(*data);
> > +               d |= (octets << 5);
> > +               *data = cpu_to_le32(d);
> >         } else {
> >                 u32 plen;
> 
> This one doesn't look like a false positive -- but isn't very clear on
> whether it's a uint16_t or a uint32_t either.

Oh, strange. This is a typo.
The code was correct and this actually broke it.
Not sure why sparse didn't complain about this obviously broken code
and did complain about the previous code, which was OK.
d must be u32, of course.

In any case, it it a false positive warning of sparse.
The attempt to fix it is broken, though.

-- 
Greetings Michael.
_______________________________________________
Bcm43xx-dev mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev

Reply via email to