Re: [PATCH v2] Move brcm80211 to mainline
From: Henry Ptasinski <hidden>
Date: 2011-08-25 00:50:04
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:quoted
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.
quoted
__skb_trim(p, pkt_len); tail = p;regards, dan carpenter
Thanks, - Henry