From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755497Ab0IHOzu (ORCPT ); Wed, 8 Sep 2010 10:55:50 -0400 Received: from mail.vyatta.com ([76.74.103.46]:60480 "EHLO mail.vyatta.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755378Ab0IHOzs (ORCPT ); Wed, 8 Sep 2010 10:55:48 -0400 Date: Wed, 8 Sep 2010 07:55:45 -0700 From: Stephen Hemminger To: Jiri Slaby 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 Subject: Re: [PATCH] Gigabit Ethernet driver of Topcliff PCH Message-ID: <20100908075545.79023fa9@nehalam> In-Reply-To: <4C879AAB.6000905@suse.cz> References: <4C81019E.1010808@dsn.okisemi.com> <4C8123D6.8020001@suse.cz> <003901cb4f5d$bf977c80$66f8800a@maildom.okisemi.com> <4C879AAB.6000905@suse.cz> Organization: Vyatta X-Mailer: Claws Mail 3.7.5 (GTK+ 2.20.1; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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. > > 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);