Re: [PATCH] Gigabit Ethernet driver of Topcliff PCH

From: Stephen Hemminger
Date: Wed Sep 08 2010 - 10:55:55 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.
>
> OK, then you have type error which you should fix instead. Perhaps
> define the constnts with U suffix?

Better yet:
rxdr->count = clamp_val(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/