From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jarek Poplawski Subject: Re: [PATCH iproute2 1/2] tc_core: Use double in tc_core_time2tick() Date: Wed, 10 Jun 2009 00:20:41 +0200 Message-ID: <20090609222041.GB2893@ami.dom.local> References: <20090609080536.GD5237@ff.dom.local> <4A2E6BA4.30002@trash.net> <20090609215425.GA2893@ami.dom.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Stephen Hemminger , Antonio Almeida , David Miller , netdev@vger.kernel.org, Martin Devera , Eric Dumazet , Vladimir Ivashchenko , Badalian Vyacheslav To: Patrick McHardy Return-path: Received: from fg-out-1718.google.com ([72.14.220.159]:18757 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750878AbZFIWUx (ORCPT ); Tue, 9 Jun 2009 18:20:53 -0400 Received: by fg-out-1718.google.com with SMTP id d23so1144403fga.17 for ; Tue, 09 Jun 2009 15:20:55 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20090609215425.GA2893@ami.dom.local> Sender: netdev-owner@vger.kernel.org List-ID: On Tue, Jun 09, 2009 at 11:54:25PM +0200, Jarek Poplawski wrote: > On Tue, Jun 09, 2009 at 04:03:16PM +0200, Patrick McHardy wrote: ... > > It seems inconsistent to have the time2tick() function take a > > double, but return an unsigned from tick2time(). If we're going > > to change this, please keep them symetrical (you could even use > > floor() in tick2time() to make it more explicit). ... > tc_core_tick2time() is used differently; it usually gets integers, to > show them as time. But even if not so, we have division here. So, I'm > not sure it's really needed, but if you confirm I'll do it in a > separate patch. OOPS! I argued for double as argument, but you're right tick2time() should return double for consistency. I'll send a separate patch. Sorry, Jarek P.