From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: [NET]: Avoid divides in net/core/gen_estimator.c Date: Thu, 3 Jan 2008 14:12:35 +0100 Message-ID: <20080103141235.dbff886f.dada1@cosmosbay.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "netdev@vger.kernel.org" To: David Miller Return-path: Received: from pfx2.jmh.fr ([194.153.89.55]:40039 "EHLO pfx2.jmh.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754314AbYACNMn (ORCPT ); Thu, 3 Jan 2008 08:12:43 -0500 Sender: netdev-owner@vger.kernel.org List-ID: We can void divides (as seen with CONFIG_CC_OPTIMIZE_FOR_SIZE=y on x86) changing ((HZ< diff --git a/net/core/gen_estimator.c b/net/core/gen_estimator.c index daadbcc..86037d1 100644 --- a/net/core/gen_estimator.c +++ b/net/core/gen_estimator.c @@ -135,7 +135,7 @@ skip: } if (!list_empty(&elist[idx].list)) - mod_timer(&elist[idx].timer, jiffies + ((HZ<list, &elist[idx].list); return 0;