From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH] Gigabit Ethernet driver of Topcliff PCH Date: Wed, 8 Sep 2010 07:54:03 -0700 Message-ID: <20100908075403.7d31758a@nehalam> References: <4C81019E.1010808@dsn.okisemi.com> <4C8123D6.8020001@suse.cz> <003901cb4f5d$bf977c80$66f8800a@maildom.okisemi.com> <4C879AAB.6000905@suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Masayuki Ohtake , Randy Dunlap , Ralf Baechle , ML netdev , MeeGo , Maxime Bizon , LKML , Kristoffer Glembo , John Linn , Joe Perches , Greg Rose , "David S. Miller" , "Wang, Yong Y" , "Wang, Qi" , Toshiharu Okada , Tomoya Morinaga , Takahiro Shimizu , Intel OTC , "Foster, Margie" , Andrew To: Jiri Slaby Return-path: In-Reply-To: <4C879AAB.6000905@suse.cz> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Wed, 08 Sep 2010 16:16:11 +0200 Jiri Slaby 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) --