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". > __skb_trim(p, pkt_len); > > tail = p; regards, dan carpenter -- 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