Re: [PATCH] Gigabit Ethernet driver of Topcliff PCH

Stephen Hemminger
2010-09-08T14:54:08Z

On Wed, 08 Sep 2010 16:16:11 +0200
Jiri Slaby <jslaby@suse.cz> 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)

--