Re: [PATCH] Gigabit Ethernet driver of Topcliff PCH

From: Masayuki Ohtake
Date: Thu Sep 09 2010 - 09:39:16 EST


On Wed, 8 Sep 2010 07:55:45 -0700
Stephen Hemminger <shemminger@xxxxxxxxxx> wrote:
>
> Better yet:
> rxdr->count = clamp_val(ring->rx_pending,
> PCH_GBE_MIN_RXD,
> PCH_GBE_MAX_RXD);

Hi Stephen

Thank you for your suggestion.
I will modify like your suggestion.
.
Thanks, Ohtake
----- Original Message -----
From: "Stephen Hemminger" <shemminger@xxxxxxxxxx>
To: "Jiri Slaby" <jslaby@xxxxxxx>
Cc: "Masayuki Ohtake" <masa-korg@xxxxxxxxxxxxxxx>; "Randy Dunlap" <randy.dunlap@xxxxxxxxxx>; "Ralf Baechle"
<ralf@xxxxxxxxxxxxxx>; "ML netdev" <netdev@xxxxxxxxxxxxxxx>; "MeeGo" <meego-dev@xxxxxxxxx>; "Maxime Bizon"
<mbizon@xxxxxxxxxx>; "LKML" <linux-kernel@xxxxxxxxxxxxxxx>; "Kristoffer Glembo" <kristoffer@xxxxxxxxxxx>; "John Linn"
<john.linn@xxxxxxxxxx>; "Joe Perches" <joe@xxxxxxxxxxx>; "Greg Rose" <gregory.v.rose@xxxxxxxxx>; "David S. Miller"
<davem@xxxxxxxxxxxxx>; "Wang, Yong Y" <yong.y.wang@xxxxxxxxx>; "Wang, Qi" <qi.wang@xxxxxxxxx>; "Toshiharu Okada"
<okada533@xxxxxxxxxxxxxxx>; "Tomoya Morinaga" <morinaga526@xxxxxxxxxxxxxxx>; "Takahiro Shimizu"
<shimizu394@xxxxxxxxxxxxxxx>; "Intel OTC" <joel.clark@xxxxxxxxx>; "Foster, Margie" <margie.foster@xxxxxxxxx>; "Andrew"
<andrew.chih.howe.khor@xxxxxxxxx>
Sent: Wednesday, September 08, 2010 11:55 PM
Subject: Re: [PATCH] Gigabit Ethernet driver of Topcliff PCH


> 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 netdev" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>



--
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/