Search Linux Wireless

Re: [PATCH v2] Move brcm80211 to mainline

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 24, 2011 at 04:05:31PM -0700, Dan Carpenter wrote:
> On Wed, Aug 24, 2011 at 03:28:01PM -0700, Henry Ptasinski wrote:
> > diff --git a/drivers/staging/brcm80211/brcmsmac/dma.c b/drivers/staging/brcm8021
> > index 05dad9f..73e5841 100644
> > --- a/drivers/staging/brcm80211/brcmsmac/dma.c
> > +++ b/drivers/staging/brcm80211/brcmsmac/dma.c
> > @@ -815,7 +815,7 @@ struct sk_buff *dma_rx(struct dma_pub *pub)
> >                 tail = head;
> >                 while ((resid > 0) && (p = _dma_getnextrxp(di, false))) {
> >                         tail->next = p;
> > -                       pkt_len = min(resid, (int)di->rxbufsize);
> > +                       pkt_len = min_t(int, resid, (int)di->rxbufsize);
> 
> This isn't right.  It should be:
> 			pkt_len = min_t(uint, resid, di->rxbufsize);
> 
> Casting it to int would mean that high values of ->rxbufsize would be
> treated as lower than "resid".

Good point.  I'll work that change into the next version or send a separate
patch to fix it up.

> 
> >                         __skb_trim(p, pkt_len);
> >  
> >                         tail = p;
> 
> regards,
> dan carpenter

Thanks,
- Henry

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux