Re: [PATCH] Gigabit Ethernet driver of Topcliff PCH

From: Stephen Hemminger
Date: Wed Sep 08 2010 - 10:54:14 EST


On Wed, 08 Sep 2010 16:16:11 +0200
Jiri Slaby <jslaby@xxxxxxx> wrote:

> >>> +
> >>> + rxdr->count = max(ring->rx_pending, (u32) PCH_GBE_MIN_RXD);
> >>> + rxdr->count = min(rxdr->count, (u32) PCH_GBE_MAX_RXD);
> >>
> >> clamp()
> >> And why you need the cast?
> >
> > [masa]
> > Since warning appears at the time of a make.

Better to use the "_t" version which does the necessary cast.
rxdr->count = clamp_t(u32, ring->rx_pending,
PCH_GBE_MIN_RXD, PCH_GBE_MAX_RXD)

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